/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM calIItipTransport.idl
 */

#ifndef __gen_calIItipTransport_h__
#define __gen_calIItipTransport_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class calIItipItem; /* forward declaration */

class calIAttendee; /* forward declaration */

class calIDateTime; /* forward declaration */


/* starting interface:    calIItipTransport */
#define CALIITIPTRANSPORT_IID_STR "d9e439da-1014-42f9-be40-aa7e878b8a7d"

#define CALIITIPTRANSPORT_IID \
  {0xd9e439da, 0x1014, 0x42f9, \
    { 0xbe, 0x40, 0xaa, 0x7e, 0x87, 0x8b, 0x8a, 0x7d }}

/**
 * calIItipTransport is a generic transport interface that is implemented
 * by transports (eg: email, XMPP, etc.) wishing to send calIItipItems
 */
class NS_NO_VTABLE calIItipTransport : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALIITIPTRANSPORT_IID)

  /**
     * Default identity for me within this transport. For example, this is
     * your default email address in Thunderbird.
     */
  /* readonly attribute AUTF8String defaultIdentity; */
  NS_IMETHOD GetDefaultIdentity(nsACString & aDefaultIdentity) = 0;

  /**
     * Sending identity. This can be set to change the "sender" identity from
     * defaultIdentity above.
     */
  /* attribute AUTF8String senderAddress; */
  NS_IMETHOD GetSenderAddress(nsACString & aSenderAddress) = 0;
  NS_IMETHOD SetSenderAddress(const nsACString & aSenderAddress) = 0;

  /**
     * Type of the transport: email, xmpp, etc.
     */
  /* readonly attribute AUTF8String type; */
  NS_IMETHOD GetType(nsACString & aType) = 0;

  /**
     * Pass the transport an itipItem and have it figure out what to do with
     * it based on the itipItem's methods.
     */
  /* void simpleSendResponse (in calIItipItem item); */
  NS_IMETHOD SimpleSendResponse(calIItipItem *item) = 0;

  /**
     * Sends a calIItipItem to the recipients using the specified title and
     * alternative representation. If a calIItipItem is attached, then an ICS
     * representation of those objects are generated and attached to the email.
     * If the calIItipItem is null, then the item(s) is sent without any
     * text/calendar mime part.
     * @param count             size of recipient array
     * @param recipientArray    array of recipients
     * @param title             title of the exchange
     * @param altrep            an alternative representation (usually text)
                                in case the recipient cannot handle the
                                text/calendar mime-type
     * @param calIItipItem      set of calIItems encapsulated as calIItipItems
     */
  /* void sendItems (in PRUint32 count, [array, size_is (count)] in calIAttendee recipientArray, in AUTF8String title, in AUTF8String altrep, in calIItipItem item); */
  NS_IMETHOD SendItems(PRUint32 count, calIAttendee **recipientArray, const nsACString & title, const nsACString & altrep, calIItipItem *item) = 0;

  /**
     * Checks the configured transport for any incoming messages with
     * text/calendar mime parts (invitations) that are more recent than the
     * specified date.  It returns a calIItipItem object containing the found
     * items
     * @param  searchStart   Defines on what date to start the search.
     * @return calIItipItem  The items it finds in a calIItipItem object.
     */
  /* calIItipItem checkForInvitations (in calIDateTime searchStart); */
  NS_IMETHOD CheckForInvitations(calIDateTime *searchStart, calIItipItem **_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALIITIPTRANSPORT \
  NS_IMETHOD GetDefaultIdentity(nsACString & aDefaultIdentity); \
  NS_IMETHOD GetSenderAddress(nsACString & aSenderAddress); \
  NS_IMETHOD SetSenderAddress(const nsACString & aSenderAddress); \
  NS_IMETHOD GetType(nsACString & aType); \
  NS_IMETHOD SimpleSendResponse(calIItipItem *item); \
  NS_IMETHOD SendItems(PRUint32 count, calIAttendee **recipientArray, const nsACString & title, const nsACString & altrep, calIItipItem *item); \
  NS_IMETHOD CheckForInvitations(calIDateTime *searchStart, calIItipItem **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALIITIPTRANSPORT(_to) \
  NS_IMETHOD GetDefaultIdentity(nsACString & aDefaultIdentity) { return _to GetDefaultIdentity(aDefaultIdentity); } \
  NS_IMETHOD GetSenderAddress(nsACString & aSenderAddress) { return _to GetSenderAddress(aSenderAddress); } \
  NS_IMETHOD SetSenderAddress(const nsACString & aSenderAddress) { return _to SetSenderAddress(aSenderAddress); } \
  NS_IMETHOD GetType(nsACString & aType) { return _to GetType(aType); } \
  NS_IMETHOD SimpleSendResponse(calIItipItem *item) { return _to SimpleSendResponse(item); } \
  NS_IMETHOD SendItems(PRUint32 count, calIAttendee **recipientArray, const nsACString & title, const nsACString & altrep, calIItipItem *item) { return _to SendItems(count, recipientArray, title, altrep, item); } \
  NS_IMETHOD CheckForInvitations(calIDateTime *searchStart, calIItipItem **_retval) { return _to CheckForInvitations(searchStart, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_CALIITIPTRANSPORT(_to) \
  NS_IMETHOD GetDefaultIdentity(nsACString & aDefaultIdentity) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultIdentity(aDefaultIdentity); } \
  NS_IMETHOD GetSenderAddress(nsACString & aSenderAddress) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSenderAddress(aSenderAddress); } \
  NS_IMETHOD SetSenderAddress(const nsACString & aSenderAddress) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSenderAddress(aSenderAddress); } \
  NS_IMETHOD GetType(nsACString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
  NS_IMETHOD SimpleSendResponse(calIItipItem *item) { return !_to ? NS_ERROR_NULL_POINTER : _to->SimpleSendResponse(item); } \
  NS_IMETHOD SendItems(PRUint32 count, calIAttendee **recipientArray, const nsACString & title, const nsACString & altrep, calIItipItem *item) { return !_to ? NS_ERROR_NULL_POINTER : _to->SendItems(count, recipientArray, title, altrep, item); } \
  NS_IMETHOD CheckForInvitations(calIDateTime *searchStart, calIItipItem **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CheckForInvitations(searchStart, _retval); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class _MYCLASS_ : public calIItipTransport
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALIITIPTRANSPORT

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, calIItipTransport)

_MYCLASS_::_MYCLASS_()
{
  /* member initializers and constructor code */
}

_MYCLASS_::~_MYCLASS_()
{
  /* destructor code */
}

/* readonly attribute AUTF8String defaultIdentity; */
NS_IMETHODIMP _MYCLASS_::GetDefaultIdentity(nsACString & aDefaultIdentity)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute AUTF8String senderAddress; */
NS_IMETHODIMP _MYCLASS_::GetSenderAddress(nsACString & aSenderAddress)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetSenderAddress(const nsACString & aSenderAddress)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute AUTF8String type; */
NS_IMETHODIMP _MYCLASS_::GetType(nsACString & aType)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void simpleSendResponse (in calIItipItem item); */
NS_IMETHODIMP _MYCLASS_::SimpleSendResponse(calIItipItem *item)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void sendItems (in PRUint32 count, [array, size_is (count)] in calIAttendee recipientArray, in AUTF8String title, in AUTF8String altrep, in calIItipItem item); */
NS_IMETHODIMP _MYCLASS_::SendItems(PRUint32 count, calIAttendee **recipientArray, const nsACString & title, const nsACString & altrep, calIItipItem *item)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* calIItipItem checkForInvitations (in calIDateTime searchStart); */
NS_IMETHODIMP _MYCLASS_::CheckForInvitations(calIDateTime *searchStart, calIItipItem **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


#endif /* __gen_calIItipTransport_h__ */
