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

#ifndef __gen_flockIMailWebService_h__
#define __gen_flockIMailWebService_h__


#ifndef __gen_flockIWebService_h__
#include "flockIWebService.h"
#endif

#ifndef __gen_nsIDOMXULElement_h__
#include "nsIDOMXULElement.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif

/* starting interface:    flockIMailWebService */
#define FLOCKIMAILWEBSERVICE_IID_STR "d1a8ceeb-b8a2-4e5d-9186-acd3952dba56"

#define FLOCKIMAILWEBSERVICE_IID \
  {0xd1a8ceeb, 0xb8a2, 0x4e5d, \
    { 0x91, 0x86, 0xac, 0xd3, 0x95, 0x2d, 0xba, 0x56 }}

/**
 * Represents a web service that supports webmail services such as Yahoo! Mail
 * and Gmail.
 *
 * This interface has no methods on it. We use it to determine e.g.
 * which services to place under the Webmail folder in the AS&S sidebar.
 */
class NS_NO_VTABLE NS_SCRIPTABLE flockIMailWebService : public flockILoginWebService {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(FLOCKIMAILWEBSERVICE_IID)

};

  NS_DEFINE_STATIC_IID_ACCESSOR(flockIMailWebService, FLOCKIMAILWEBSERVICE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_FLOCKIMAILWEBSERVICE \
  /* no methods! */

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_FLOCKIMAILWEBSERVICE(_to) \
  /* no methods! */

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_FLOCKIMAILWEBSERVICE(_to) \
  /* no methods! */

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

/* Header file */
class _MYCLASS_ : public flockIMailWebService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_FLOCKIMAILWEBSERVICE

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

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


/* starting interface:    flockIWebmailAccount */
#define FLOCKIWEBMAILACCOUNT_IID_STR "6a168a79-cdfc-43ef-ba92-7c5815d34b0e"

#define FLOCKIWEBMAILACCOUNT_IID \
  {0x6a168a79, 0xcdfc, 0x43ef, \
    { 0xba, 0x92, 0x7c, 0x58, 0x15, 0xd3, 0x4b, 0x0e }}

/**
 * Represents a web service account for a webmail service such as
 * Yahoo! Mail or Gmail.
 */
class NS_NO_VTABLE NS_SCRIPTABLE flockIWebmailAccount : public flockIWebServiceAccount {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(FLOCKIWEBMAILACCOUNT_IID)

  /**
   * Retrieve the compose message URL for the service.
   *
   * DEFAULT IMPLEMENTATION: Yes.
   *
   * @param aMailParams (in) The mail parameters in either of the following
   *                         formats:
   *                         1) mailto:foo@bar.com?subject=msg1&body=msg2...
   *                         2) to=foo@bar.com&subject=mesg1&body=msg2...
   * @return The compose message URL for the service.
   */
  /* AString getComposeURL (in AString aMailParams); */
  NS_SCRIPTABLE NS_IMETHOD GetComposeURL(const nsAString & aMailParams, nsAString & _retval) = 0;

  /**
   * Does any special handling necessary after the compose URL has loaded.
   *
   * DEFAULT IMPLEMENTATION: Yes.
   *
   * @param aComposeURL (in) The compose message URL for the service.
   * @param aTabBrowser (in) The tab browser which contains the compose page.
   */
  /* void onComposeURLLoaded (in AString aComposeURL, in nsIDOMXULElement aTabBrowser); */
  NS_SCRIPTABLE NS_IMETHOD OnComposeURLLoaded(const nsAString & aComposeURL, nsIDOMXULElement *aTabBrowser) = 0;

  /**
   * Retrieve the account email address.
   *
   * DEFAULT IMPLEMENTATION: No.
   *
   * @return The account email address.
   */
  /* AString getEmailAddress (); */
  NS_SCRIPTABLE NS_IMETHOD GetEmailAddress(nsAString & _retval) = 0;

  /**
   * Retrieve the inbox URL for the account.
   *
   * DEFAULT IMPLEMENTATION: Yes.
   *
   * @return The inbox URL for the account.
   */
  /* AString getInboxURL (); */
  NS_SCRIPTABLE NS_IMETHOD GetInboxURL(nsAString & _retval) = 0;

  /**
   * Retrieve the unread messages for the account.
   *
   * DEFAULT IMPLEMENTATION: Yes.
   *
   * @param aCheckNow (in) True to query the webmail service for new unread
   *                       messages before returning the unread messages.
   * @return The unread messages in a JSON string containing:
   *         lastCheckedDate,
   *         newestMessageDate,
   *         unreadMesageCount,
   *         array of messages (containing: from, subject and the message URL).
   */
  /* AString getUnreadMessages (in boolean aCheckNow); */
  NS_SCRIPTABLE NS_IMETHOD GetUnreadMessages(PRBool aCheckNow, nsAString & _retval) = 0;

  /**
   * Retrieve the URL to upgrade to the service's pro account.
   *
   * DEFAULT IMPLEMENTATION: Yes.
   *
   * @return A JSON string containing the title of the pro account
   *         (eg Yahoo! Mail Plus) and the URL to upgrade to the pro account.
   */
  /* AString getUpgradeAccount (); */
  NS_SCRIPTABLE NS_IMETHOD GetUpgradeAccount(nsAString & _retval) = 0;

  /**
   * Is this the primary webmail account?
   *
   * DEFAULT IMPLEMENTATION: Yes.
   *
   * @return true if this is the primary webmail account.
   */
  /* boolean isPrimary (); */
  NS_SCRIPTABLE NS_IMETHOD IsPrimary(PRBool *_retval) = 0;

  /**
   * Flock may detect, perhaps after a failed API call, that this account's
   * session has expired.
   *
   * DEFAULT IMPLEMENTATION: Yes.
   *
   * @return true if the account's session has expired.
   */
  /* boolean isSessionExpired (); */
  NS_SCRIPTABLE NS_IMETHOD IsSessionExpired(PRBool *_retval) = 0;

  /**
   * Refreshes the unread message list from the webmail service.
   *
   * DEFAULT IMPLEMENTATION: Yes.
   */
  /* void refreshUnreadMessageList (); */
  NS_SCRIPTABLE NS_IMETHOD RefreshUnreadMessageList(void) = 0;

  /**
   * Sets the account as the primary webmail account and unsets the former.
   *
   * DEFAULT IMPLEMENTATION: Yes.
   */
  /* void setAsPrimary (); */
  NS_SCRIPTABLE NS_IMETHOD SetAsPrimary(void) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(flockIWebmailAccount, FLOCKIWEBMAILACCOUNT_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_FLOCKIWEBMAILACCOUNT \
  NS_SCRIPTABLE NS_IMETHOD GetComposeURL(const nsAString & aMailParams, nsAString & _retval); \
  NS_SCRIPTABLE NS_IMETHOD OnComposeURLLoaded(const nsAString & aComposeURL, nsIDOMXULElement *aTabBrowser); \
  NS_SCRIPTABLE NS_IMETHOD GetEmailAddress(nsAString & _retval); \
  NS_SCRIPTABLE NS_IMETHOD GetInboxURL(nsAString & _retval); \
  NS_SCRIPTABLE NS_IMETHOD GetUnreadMessages(PRBool aCheckNow, nsAString & _retval); \
  NS_SCRIPTABLE NS_IMETHOD GetUpgradeAccount(nsAString & _retval); \
  NS_SCRIPTABLE NS_IMETHOD IsPrimary(PRBool *_retval); \
  NS_SCRIPTABLE NS_IMETHOD IsSessionExpired(PRBool *_retval); \
  NS_SCRIPTABLE NS_IMETHOD RefreshUnreadMessageList(void); \
  NS_SCRIPTABLE NS_IMETHOD SetAsPrimary(void); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_FLOCKIWEBMAILACCOUNT(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetComposeURL(const nsAString & aMailParams, nsAString & _retval) { return _to GetComposeURL(aMailParams, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD OnComposeURLLoaded(const nsAString & aComposeURL, nsIDOMXULElement *aTabBrowser) { return _to OnComposeURLLoaded(aComposeURL, aTabBrowser); } \
  NS_SCRIPTABLE NS_IMETHOD GetEmailAddress(nsAString & _retval) { return _to GetEmailAddress(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetInboxURL(nsAString & _retval) { return _to GetInboxURL(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetUnreadMessages(PRBool aCheckNow, nsAString & _retval) { return _to GetUnreadMessages(aCheckNow, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetUpgradeAccount(nsAString & _retval) { return _to GetUpgradeAccount(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD IsPrimary(PRBool *_retval) { return _to IsPrimary(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD IsSessionExpired(PRBool *_retval) { return _to IsSessionExpired(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD RefreshUnreadMessageList(void) { return _to RefreshUnreadMessageList(); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsPrimary(void) { return _to SetAsPrimary(); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_FLOCKIWEBMAILACCOUNT(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetComposeURL(const nsAString & aMailParams, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetComposeURL(aMailParams, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD OnComposeURLLoaded(const nsAString & aComposeURL, nsIDOMXULElement *aTabBrowser) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnComposeURLLoaded(aComposeURL, aTabBrowser); } \
  NS_SCRIPTABLE NS_IMETHOD GetEmailAddress(nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEmailAddress(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetInboxURL(nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInboxURL(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetUnreadMessages(PRBool aCheckNow, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUnreadMessages(aCheckNow, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetUpgradeAccount(nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUpgradeAccount(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD IsPrimary(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsPrimary(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD IsSessionExpired(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsSessionExpired(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD RefreshUnreadMessageList(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RefreshUnreadMessageList(); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsPrimary(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsPrimary(); } 

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

/* Header file */
class _MYCLASS_ : public flockIWebmailAccount
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_FLOCKIWEBMAILACCOUNT

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* AString getComposeURL (in AString aMailParams); */
NS_IMETHODIMP _MYCLASS_::GetComposeURL(const nsAString & aMailParams, nsAString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onComposeURLLoaded (in AString aComposeURL, in nsIDOMXULElement aTabBrowser); */
NS_IMETHODIMP _MYCLASS_::OnComposeURLLoaded(const nsAString & aComposeURL, nsIDOMXULElement *aTabBrowser)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AString getEmailAddress (); */
NS_IMETHODIMP _MYCLASS_::GetEmailAddress(nsAString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AString getInboxURL (); */
NS_IMETHODIMP _MYCLASS_::GetInboxURL(nsAString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AString getUnreadMessages (in boolean aCheckNow); */
NS_IMETHODIMP _MYCLASS_::GetUnreadMessages(PRBool aCheckNow, nsAString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AString getUpgradeAccount (); */
NS_IMETHODIMP _MYCLASS_::GetUpgradeAccount(nsAString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean isPrimary (); */
NS_IMETHODIMP _MYCLASS_::IsPrimary(PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean isSessionExpired (); */
NS_IMETHODIMP _MYCLASS_::IsSessionExpired(PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void refreshUnreadMessageList (); */
NS_IMETHODIMP _MYCLASS_::RefreshUnreadMessageList()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsPrimary (); */
NS_IMETHODIMP _MYCLASS_::SetAsPrimary()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_flockIMailWebService_h__ */
