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

#ifndef __gen_calIGoogleSession_h__
#define __gen_calIGoogleSession_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 calIGoogleSession; /* forward declaration */

class calIGoogleCalendar; /* forward declaration */

class calIEvent; /* forward declaration */

class calIDateTime; /* forward declaration */

class calIGenericOperationListener; /* forward declaration */

class calIOperationListener; /* forward declaration */

class calIGoogleRequest; /* forward declaration */

class calIOperation; /* forward declaration */

class nsIVariant; /* forward declaration */


/* starting interface:    calIGoogleSessionManager */
#define CALIGOOGLESESSIONMANAGER_IID_STR "6a7ba1f0-f271-49b0-8e93-5ca33651b4af"

#define CALIGOOGLESESSIONMANAGER_IID \
  {0x6a7ba1f0, 0xf271, 0x49b0, \
    { 0x8e, 0x93, 0x5c, 0xa3, 0x36, 0x51, 0xb4, 0xaf }}

class NS_NO_VTABLE calIGoogleSessionManager : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALIGOOGLESESSIONMANAGER_IID)

  /**
     * getSessionByUsername
     * Get a Session object for the specified username. If aCreate is false,
     * null will be returned if the session doesn't exist. Otherwise, the
     * session will be created.
     *
     * @param aUsername The username to get the session for
     * @param aCreate   If true, the session will be created prior to returning
     */
  /* calIGoogleSession getSessionByUsername (in AUTF8String aUsername, in boolean aCreate); */
  NS_IMETHOD GetSessionByUsername(const nsACString & aUsername, PRBool aCreate, calIGoogleSession **_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALIGOOGLESESSIONMANAGER \
  NS_IMETHOD GetSessionByUsername(const nsACString & aUsername, PRBool aCreate, calIGoogleSession **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALIGOOGLESESSIONMANAGER(_to) \
  NS_IMETHOD GetSessionByUsername(const nsACString & aUsername, PRBool aCreate, calIGoogleSession **_retval) { return _to GetSessionByUsername(aUsername, aCreate, _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_CALIGOOGLESESSIONMANAGER(_to) \
  NS_IMETHOD GetSessionByUsername(const nsACString & aUsername, PRBool aCreate, calIGoogleSession **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSessionByUsername(aUsername, aCreate, _retval); } 

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

/* Header file */
class _MYCLASS_ : public calIGoogleSessionManager
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALIGOOGLESESSIONMANAGER

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* calIGoogleSession getSessionByUsername (in AUTF8String aUsername, in boolean aCreate); */
NS_IMETHODIMP _MYCLASS_::GetSessionByUsername(const nsACString & aUsername, PRBool aCreate, calIGoogleSession **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    calIGoogleSession */
#define CALIGOOGLESESSION_IID_STR "652f6233-e03f-438a-bd3b-39877f68c0f4"

#define CALIGOOGLESESSION_IID \
  {0x652f6233, 0xe03f, 0x438a, \
    { 0xbd, 0x3b, 0x39, 0x87, 0x7f, 0x68, 0xc0, 0xf4 }}

class NS_NO_VTABLE calIGoogleSession : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALIGOOGLESESSION_IID)

  /**
     * The Authentication Token from Google
     */
  /* readonly attribute AUTF8String authToken; */
  NS_IMETHOD GetAuthToken(nsACString & aAuthToken) = 0;

  /**
     * The username for this session. To get a session with a different
     * username, use calIGoogleSessionManager.
     */
  /* readonly attribute AUTF8String userName; */
  NS_IMETHOD GetUserName(nsACString & aUserName) = 0;

  /**
     * If set, the password will persist across restarts.
     */
  /* attribute boolean persist; */
  NS_IMETHOD GetPersist(PRBool *aPersist) = 0;
  NS_IMETHOD SetPersist(PRBool aPersist) = 0;

  /**
     * The user's full name, usually retrieved from the XML <author> fields. If
     * unset, this will return the userName attribute.
     */
  /* attribute AUTF8String fullName; */
  NS_IMETHOD GetFullName(nsACString & aFullName) = 0;
  NS_IMETHOD SetFullName(const nsACString & aFullName) = 0;

  /**
     * The password used to authenticate. It is only important to implement the
     * setter here, since the password is only used internally.
     */
  /* attribute AUTF8String password; */
  NS_IMETHOD GetPassword(nsACString & aPassword) = 0;
  NS_IMETHOD SetPassword(const nsACString & aPassword) = 0;

  /**
     * Resets the Auth token and sets the persist attribute to false.
     */
  /* void invalidate (); */
  NS_IMETHOD Invalidate(void) = 0;

  /**
     * getCalendars
     * Get the list of calendars for this session. The operaion listener will be
     * called with an array of calIGoogleCalendars.
     *
     * @param aListener The listener to call when the calendars were retrieved
     */
  /* calIOperation getCalendars (in calIGenericOperationListener aListener); */
  NS_IMETHOD GetCalendars(calIGenericOperationListener *aListener, calIOperation **_retval) = 0;

  /**
     * asyncItemRequest
     * Send a request to Google, logging in to the session if required.
     *
     * @param aRequest      The calIGoogleRequest to send
     */
  /* void asyncItemRequest (in calIGoogleRequest aRequest); */
  NS_IMETHOD AsyncItemRequest(calIGoogleRequest *aRequest) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALIGOOGLESESSION \
  NS_IMETHOD GetAuthToken(nsACString & aAuthToken); \
  NS_IMETHOD GetUserName(nsACString & aUserName); \
  NS_IMETHOD GetPersist(PRBool *aPersist); \
  NS_IMETHOD SetPersist(PRBool aPersist); \
  NS_IMETHOD GetFullName(nsACString & aFullName); \
  NS_IMETHOD SetFullName(const nsACString & aFullName); \
  NS_IMETHOD GetPassword(nsACString & aPassword); \
  NS_IMETHOD SetPassword(const nsACString & aPassword); \
  NS_IMETHOD Invalidate(void); \
  NS_IMETHOD GetCalendars(calIGenericOperationListener *aListener, calIOperation **_retval); \
  NS_IMETHOD AsyncItemRequest(calIGoogleRequest *aRequest); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALIGOOGLESESSION(_to) \
  NS_IMETHOD GetAuthToken(nsACString & aAuthToken) { return _to GetAuthToken(aAuthToken); } \
  NS_IMETHOD GetUserName(nsACString & aUserName) { return _to GetUserName(aUserName); } \
  NS_IMETHOD GetPersist(PRBool *aPersist) { return _to GetPersist(aPersist); } \
  NS_IMETHOD SetPersist(PRBool aPersist) { return _to SetPersist(aPersist); } \
  NS_IMETHOD GetFullName(nsACString & aFullName) { return _to GetFullName(aFullName); } \
  NS_IMETHOD SetFullName(const nsACString & aFullName) { return _to SetFullName(aFullName); } \
  NS_IMETHOD GetPassword(nsACString & aPassword) { return _to GetPassword(aPassword); } \
  NS_IMETHOD SetPassword(const nsACString & aPassword) { return _to SetPassword(aPassword); } \
  NS_IMETHOD Invalidate(void) { return _to Invalidate(); } \
  NS_IMETHOD GetCalendars(calIGenericOperationListener *aListener, calIOperation **_retval) { return _to GetCalendars(aListener, _retval); } \
  NS_IMETHOD AsyncItemRequest(calIGoogleRequest *aRequest) { return _to AsyncItemRequest(aRequest); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_CALIGOOGLESESSION(_to) \
  NS_IMETHOD GetAuthToken(nsACString & aAuthToken) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAuthToken(aAuthToken); } \
  NS_IMETHOD GetUserName(nsACString & aUserName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserName(aUserName); } \
  NS_IMETHOD GetPersist(PRBool *aPersist) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPersist(aPersist); } \
  NS_IMETHOD SetPersist(PRBool aPersist) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPersist(aPersist); } \
  NS_IMETHOD GetFullName(nsACString & aFullName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFullName(aFullName); } \
  NS_IMETHOD SetFullName(const nsACString & aFullName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFullName(aFullName); } \
  NS_IMETHOD GetPassword(nsACString & aPassword) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPassword(aPassword); } \
  NS_IMETHOD SetPassword(const nsACString & aPassword) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPassword(aPassword); } \
  NS_IMETHOD Invalidate(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Invalidate(); } \
  NS_IMETHOD GetCalendars(calIGenericOperationListener *aListener, calIOperation **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCalendars(aListener, _retval); } \
  NS_IMETHOD AsyncItemRequest(calIGoogleRequest *aRequest) { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncItemRequest(aRequest); } 

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

/* Header file */
class _MYCLASS_ : public calIGoogleSession
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALIGOOGLESESSION

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* readonly attribute AUTF8String authToken; */
NS_IMETHODIMP _MYCLASS_::GetAuthToken(nsACString & aAuthToken)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute AUTF8String userName; */
NS_IMETHODIMP _MYCLASS_::GetUserName(nsACString & aUserName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute boolean persist; */
NS_IMETHODIMP _MYCLASS_::GetPersist(PRBool *aPersist)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetPersist(PRBool aPersist)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute AUTF8String fullName; */
NS_IMETHODIMP _MYCLASS_::GetFullName(nsACString & aFullName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetFullName(const nsACString & aFullName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute AUTF8String password; */
NS_IMETHODIMP _MYCLASS_::GetPassword(nsACString & aPassword)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetPassword(const nsACString & aPassword)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void invalidate (); */
NS_IMETHODIMP _MYCLASS_::Invalidate()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* calIOperation getCalendars (in calIGenericOperationListener aListener); */
NS_IMETHODIMP _MYCLASS_::GetCalendars(calIGenericOperationListener *aListener, calIOperation **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void asyncItemRequest (in calIGoogleRequest aRequest); */
NS_IMETHODIMP _MYCLASS_::AsyncItemRequest(calIGoogleRequest *aRequest)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_calIGoogleSession_h__ */
