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

#ifndef __gen_flockIAccountUtils_h__
#define __gen_flockIAccountUtils_h__


#ifndef __gen_nsIDOMHTMLDocument_h__
#include "nsIDOMHTMLDocument.h"
#endif

#ifndef __gen_nsIDOMHTMLElement_h__
#include "nsIDOMHTMLElement.h"
#endif

#ifndef __gen_nsIDOMHTMLFormElement_h__
#include "nsIDOMHTMLFormElement.h"
#endif

#ifndef __gen_nsILoginInfo_h__
#include "nsILoginInfo.h"
#endif

#ifndef __gen_nsIPropertyBag_h__
#include "nsIPropertyBag.h"
#endif

#ifndef __gen_nsISimpleEnumerator_h__
#include "nsISimpleEnumerator.h"
#endif

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

#ifndef __gen_nsITransferable_h__
#include "nsITransferable.h"
#endif

#ifndef __gen_flockIBookmarkWebService_h__
#include "flockIBookmarkWebService.h"
#endif

#ifndef __gen_flockIWebDetective_h__
#include "flockIWebDetective.h"
#endif

#ifndef __gen_flockIWebService_h__
#include "flockIWebService.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:    flockIAccountUtils */
#define FLOCKIACCOUNTUTILS_IID_STR "5e88735f-8956-46b2-a600-1bc910da7896"

#define FLOCKIACCOUNTUTILS_IID \
  {0x5e88735f, 0x8956, 0x46b2, \
    { 0xa6, 0x00, 0x1b, 0xc9, 0x10, 0xda, 0x78, 0x96 }}

/**
 * Interface for the flockAccountUtils service.  Various helpful functions for
 * doing Accounts and Services stuff.
 *
 * More documentation here:
 * http://developer.flock.com/wiki/Accounts_Management
 */
class NS_NO_VTABLE NS_SCRIPTABLE flockIAccountUtils : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(FLOCKIACCOUNTUTILS_IID)

  /**
   * Clears the temporary password with the specified key from memory.  Note
   * that these temporary passwords are stored in memory only and as such will
   * not persist beyond the current browser session as it is.  This method
   * provides an extra peace-of-mind security measure of explicitly purging it
   * when it is no longer needed.
   *
   * @param aKey (in) The unique hash key of the temp password entry to delete
   *
   * @see getTempPassword
   * @see setTempPassword
   */
  /* void clearTempPassword (in AString aKey); */
  NS_SCRIPTABLE NS_IMETHOD ClearTempPassword(const nsAString & aKey) = 0;

  /**
   * Makes sure that the specified account has isAuthenticated==TRUE, and that
   * all other accounts with the same service have isAuthenticated==FALSE.
   *
   * @param aAccount (in) The XPCOM account.
   *
   * @return The previous value of isAuthenticated for the specified account.
   */
  /* boolean ensureOnlyAuthenticatedAccount (in flockIWebServiceAccount aAccount); */
  NS_SCRIPTABLE NS_IMETHOD EnsureOnlyAuthenticatedAccount(flockIWebServiceAccount *aAccount, PRBool *_retval) = 0;

  /**
   * Call this before logging in to the specified account to ensure that there
   * are no other accounts logged in to this service. If an authenticated
   * account is found, the user will be prompted to confirm a forced logout of
   * that account.
   *
   * @param aAccount (in) The XPCOM account.
   *
   * @return TRUE if there are no authenticated accounts or we successfully log
   *         out of an authenticated account; else FALSE.
   */
  /* boolean ensureNoAuthenticatedAccountsBeforeLogin (in flockIWebServiceAccount aAccount); */
  NS_SCRIPTABLE NS_IMETHOD EnsureNoAuthenticatedAccountsBeforeLogin(flockIWebServiceAccount *aAccount, PRBool *_retval) = 0;

  /**
   * Searches Flock's data store for an account for the specified service with
   * the specified account ID.
   *
   * @param aService (in) The XPCOM service
   * @param aAccountId (in) The unique account identifier used by the web
   *        service
   * @return The RDF node id of the account, if a match is found.
   */
  /* flockIWebServiceAccount getAccountById (in flockIWebService aService, in AString aAccountId); */
  NS_SCRIPTABLE NS_IMETHOD GetAccountById(flockIWebService *aService, const nsAString & aAccountId, flockIWebServiceAccount **_retval) = 0;

  /**
   * Searches for a matching login stored in the Login Manager.
   *
   * @return The XPCOM account, if a match is found.
   */
  /* flockIWebServiceAccount getAccountByLogin (in flockIWebService aService, in AString aLogin); */
  NS_SCRIPTABLE NS_IMETHOD GetAccountByLogin(flockIWebService *aService, const nsAString & aLogin, flockIWebServiceAccount **_retval) = 0;

  /**
   * Retrieves a flockIWebService service given its short name.
   *
   * @param aShortname (in) the short name for the service.
   * @return flockIWebService.
   *
   * @see flockIWebService
   */
  /* flockIWebService getServiceFromShortname (in AString aShortname); */
  NS_SCRIPTABLE NS_IMETHOD GetServiceFromShortname(const nsAString & aShortname, flockIWebService **_retval) = 0;

  /**
   * Retrieves all the flockIWebService services that implement the interface
   * specified by aWebServiceInterface, as an enumerator of flockIWebServices.
   *
   * @param aWebServiceInterface (in) the web service interface name for which
   *                                  we want to enumerate services
   * @return nsISimpleEnumerator of flockIWebService objects.
   *
   * @see flockIWebService
   */
  /* nsISimpleEnumerator getWebServicesByInterface (in AString aWebServiceInterface); */
  NS_SCRIPTABLE NS_IMETHOD GetWebServicesByInterface(const nsAString & aWebServiceInterface, nsISimpleEnumerator **_retval) = 0;

  /**
   * Retrieves all the accounts that implement the interface specified by
   * aInterface, as an enumerator of flockIWebServiceAccounts.
   *
   * @param aServiceInterface (in) the web service interface name for which we
   *        want to enumerate accounts
   * @return nsISimpleEnumerator of flockIWebServiceAccount objects.
   *
   * @see flockIWebServiceAccount
   */
  /* nsISimpleEnumerator getAccountsByInterface (in AString aServiceInterface); */
  NS_SCRIPTABLE NS_IMETHOD GetAccountsByInterface(const nsAString & aServiceInterface, nsISimpleEnumerator **_retval) = 0;

  /**
   * Checks if any accounts are configured.
   *
   * return TRUE if any configured accounts found; else FALSE.
   */
  /* boolean doAccountsExist (); */
  NS_SCRIPTABLE NS_IMETHOD DoAccountsExist(PRBool *_retval) = 0;

  /* nsIDOMHTMLElement getElementByAttribute (in nsIDOMHTMLElement aAncestorElement, in AString aAttributeName, in AString aAttributeValue); */
  NS_SCRIPTABLE NS_IMETHOD GetElementByAttribute(nsIDOMHTMLElement *aAncestorElement, const nsAString & aAttributeName, const nsAString & aAttributeValue, nsIDOMHTMLElement **_retval) = 0;

  /**
   * Create an account on the given service. Should only be called by the
   * service itself. For some services, the accountId and the username
   * may be the same.
   *
   * @param aService (in) Service responsible for the new account.
   * @param aAccountId (in) AccountId on the service.
   * @param aUsername (in) Username on the service.
   * @param aUrl (in) The URL of the account; usually corresponds to the
   *        profile page of the user on the service, or a dashboard page.
   *        If null, defaults to the service URL.
   * @param aIsTransient (in) Whether the account should be created transient
   *        or not. At the end of the session, all transient accounts are
   *        deleted.
   * @return RDF id of the newly created account.
   */
  /* AString createAccount (in flockIWebService aService, in AString aAccountId, in AString aUsername, in AString aUrl, in boolean aIsTransient); */
  NS_SCRIPTABLE NS_IMETHOD CreateAccount(flockIWebService *aService, const nsAString & aAccountId, const nsAString & aUsername, const nsAString & aUrl, PRBool aIsTransient, nsAString & _retval) = 0;

  /**
   * Remove (or "forget") an account and its associated identities.
   *
   * @param aAccountUrn (in) RDF id of the account to forget.
   */
  /* void removeAccount (in AString aAccountUrn); */
  NS_SCRIPTABLE NS_IMETHOD RemoveAccount(const nsAString & aAccountUrn) = 0;

  /**
   * Removes all configured accounts from the RDF, after first calling
   * .logout() on each account to be removed.
   *
   * @see flockIWebServiceAccount#logout
   * @see flockIWebServiceAccount#remove
   */
  /* void removeAllAccounts (); */
  NS_SCRIPTABLE NS_IMETHOD RemoveAllAccounts(void) = 0;

  /* AString getCookie (in AString aHost, in AString aCookieName); */
  NS_SCRIPTABLE NS_IMETHOD GetCookie(const nsAString & aHost, const nsAString & aCookieName, nsAString & _retval) = 0;

  /**
   * Retrieves the password with the specified hash key.  This method looks
   * first in the temporary password hash, and if not found there then it looks
   * in Login Manager.
   */
  /* nsILoginInfo getPassword (in AString aKey); */
  NS_SCRIPTABLE NS_IMETHOD GetPassword(const nsAString & aKey, nsILoginInfo **_retval) = 0;

  /**
   * Retrieves the first password entry found in Login Manager for the given
   * host.
   */
  /* nsILoginInfo getFirstPasswordForHost (in AString aHost); */
  NS_SCRIPTABLE NS_IMETHOD GetFirstPasswordForHost(const nsAString & aHost, nsILoginInfo **_retval) = 0;

  /**
   * Retrieve the temporary password entry stored (in-memory) with the
   * specified hash key.
   *
   * @param aKey (in) The unique hash key of the temp password entry to
   *        retrieve
   * @return flockILoginInfo object, or null if the entry was not found
   *
   * @see clearTempPassword
   * @see setTempPassword
   */
  /* flockILoginInfo getTempPassword (in AString aKey); */
  NS_SCRIPTABLE NS_IMETHOD GetTempPassword(const nsAString & aKey, flockILoginInfo **_retval) = 0;

  /**
   * Removes a temporily in-memory password and puts in into Password
   * Manager for real.
   *
   * @param aKey (in) The unique hash key of the temp password make permanent
   * @return an nsILoginInfo object with the username and password, for
   *         convenience
   */
  /* nsILoginInfo makeTempPasswordPermanent (in AString aKey); */
  NS_SCRIPTABLE NS_IMETHOD MakeTempPasswordPermanent(const nsAString & aKey, nsILoginInfo **_retval) = 0;

  /**
   * Sets the isAuthenticated RDF property to FALSE for all accounts associated
   * with the specified service.
   */
  /* void markAllAccountsAsLoggedOut (in flockIWebService aService); */
  NS_SCRIPTABLE NS_IMETHOD MarkAllAccountsAsLoggedOut(flockIWebService *aService) = 0;

  /**
   * Simple wrapper for the Login Manager addLogin() method.
   *
   * @see nsILoginManager#addLogin
   */
  /* void setPassword (in AString aHost, in AString aUser, in AString aPassword); */
  NS_SCRIPTABLE NS_IMETHOD SetPassword(const nsAString & aHost, const nsAString & aUser, const nsAString & aPassword) = 0;

  /**
   * Set a temporary password to be kept in memory for this browser session, or
   * until specifically purged using the clearTempPassword() method.  Note that
   * these passwords are specifically NOT stored using Login Manager because
   * that is not guaranteed to clear them after this browser session.
   *
   * @param aKey (in) The unique hash key of the temp password entry to store
   * @param aUser (in) The username used for login
   * @param aPassword (in) The password string
   * @param aFormType (in) The type of form where the password was captured from
   *
   * @see clearTempPassword
   * @see getTempPassword
   */
  /* void setTempPassword (in AString aKey, in AString aUser, in AString aPassword, in AString aFormType); */
  NS_SCRIPTABLE NS_IMETHOD SetTempPassword(const nsAString & aKey, const nsAString & aUser, const nsAString & aPassword, const nsAString & aFormType) = 0;

  /**
   * Deletes all password entries in Login Manager for the specified host.
   */
  /* void removeAllPasswordsForHost (in AString aHost); */
  NS_SCRIPTABLE NS_IMETHOD RemoveAllPasswordsForHost(const nsAString & aHost) = 0;

  /**
   * Delete the password entry in Login Manager for the specified hash key.
   *
   * @param aKey (in) The unique hash key of the password entry to retrieve
   * @return nsILoginInfo object, or null if the entry was not found
   */
  /* nsILoginInfo removePassword (in AString aHost); */
  NS_SCRIPTABLE NS_IMETHOD RemovePassword(const nsAString & aHost, nsILoginInfo **_retval) = 0;

  /**
   * Tries ripping through an HTML Form DOM to find a username and password.
   *
   * @param aForm (in) HTML Form element to look under
   * @return nsILoginInfo object if a likely username/password pair is found;
   *                      otherwise null
   */
  /* nsILoginInfo extractPasswordFromHTMLForm (in nsIDOMHTMLFormElement aForm); */
  NS_SCRIPTABLE NS_IMETHOD ExtractPasswordFromHTMLForm(nsIDOMHTMLFormElement *aForm, nsILoginInfo **_retval) = 0;

  /**
   * Looks for the named Web Detective rules file under the 'detect' folder in
   * the user's profile dir, and loads it into Web Detective. If does not exist
   * it first copies it from the "aSubDir" folder in the app's profile dir.
   *
   * [ Note that this will only work with XML rules files shipped with the
   * application.]
   *
   * More usage documentation here:
   * http://developer.flock.com/wiki/Web_Detective
   *
   * This can be used by app-managed Extensions. Other extensions will not be
   * able to call this function, and should instead manually load the XML rules
   * files into Web Detective using {flockIWebDetective}.loadFromChrome()
   *
   * @param aDetectionFileName (in) Name (not path) of the XML file to load.
   * @param aSubDir (in) Sub directory in app's profile dir.(e.g "res/detect")
   * @return A handle to the Web Detective service.
   */
  /* flockIWebDetective loadWebDetectiveFile (in AString aDetectionFileName, in AString aSubDir); */
  NS_SCRIPTABLE NS_IMETHOD LoadWebDetectiveFile(const nsAString & aDetectionFileName, const nsAString & aSubDir, flockIWebDetective **_retval) = 0;

  /**
   * Takes an enumeration of cookie descriptors and removes any stored cookies
   * matching those descriptors.
   *
   * @param aCookies (in) nsISimpleEnumerator of nsICookie objects
   *
   * @see nsICookie
   */
  /* void removeCookies (in nsISimpleEnumerator aCookies); */
  NS_SCRIPTABLE NS_IMETHOD RemoveCookies(nsISimpleEnumerator *aCookies) = 0;

  /**
   * Determines whether the People Sidebar is open, and more specifically
   * whether it is open to a particular service tab.
   *
   * @return null if the sidebar is closed or 
   *         the contractId of the opened tab (or "all" if the All tab is open).
   */
  /* AString peopleSidebarOpen (); */
  NS_SCRIPTABLE NS_IMETHOD PeopleSidebarOpen(nsAString & _retval) = 0;

  /**
   * @return TRUE if the primary account is logged in and has new messages
   */
  /* boolean primaryAccountIsHot (); */
  NS_SCRIPTABLE NS_IMETHOD PrimaryAccountIsHot(PRBool *_retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(flockIAccountUtils, FLOCKIACCOUNTUTILS_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_FLOCKIACCOUNTUTILS \
  NS_SCRIPTABLE NS_IMETHOD ClearTempPassword(const nsAString & aKey); \
  NS_SCRIPTABLE NS_IMETHOD EnsureOnlyAuthenticatedAccount(flockIWebServiceAccount *aAccount, PRBool *_retval); \
  NS_SCRIPTABLE NS_IMETHOD EnsureNoAuthenticatedAccountsBeforeLogin(flockIWebServiceAccount *aAccount, PRBool *_retval); \
  NS_SCRIPTABLE NS_IMETHOD GetAccountById(flockIWebService *aService, const nsAString & aAccountId, flockIWebServiceAccount **_retval); \
  NS_SCRIPTABLE NS_IMETHOD GetAccountByLogin(flockIWebService *aService, const nsAString & aLogin, flockIWebServiceAccount **_retval); \
  NS_SCRIPTABLE NS_IMETHOD GetServiceFromShortname(const nsAString & aShortname, flockIWebService **_retval); \
  NS_SCRIPTABLE NS_IMETHOD GetWebServicesByInterface(const nsAString & aWebServiceInterface, nsISimpleEnumerator **_retval); \
  NS_SCRIPTABLE NS_IMETHOD GetAccountsByInterface(const nsAString & aServiceInterface, nsISimpleEnumerator **_retval); \
  NS_SCRIPTABLE NS_IMETHOD DoAccountsExist(PRBool *_retval); \
  NS_SCRIPTABLE NS_IMETHOD GetElementByAttribute(nsIDOMHTMLElement *aAncestorElement, const nsAString & aAttributeName, const nsAString & aAttributeValue, nsIDOMHTMLElement **_retval); \
  NS_SCRIPTABLE NS_IMETHOD CreateAccount(flockIWebService *aService, const nsAString & aAccountId, const nsAString & aUsername, const nsAString & aUrl, PRBool aIsTransient, nsAString & _retval); \
  NS_SCRIPTABLE NS_IMETHOD RemoveAccount(const nsAString & aAccountUrn); \
  NS_SCRIPTABLE NS_IMETHOD RemoveAllAccounts(void); \
  NS_SCRIPTABLE NS_IMETHOD GetCookie(const nsAString & aHost, const nsAString & aCookieName, nsAString & _retval); \
  NS_SCRIPTABLE NS_IMETHOD GetPassword(const nsAString & aKey, nsILoginInfo **_retval); \
  NS_SCRIPTABLE NS_IMETHOD GetFirstPasswordForHost(const nsAString & aHost, nsILoginInfo **_retval); \
  NS_SCRIPTABLE NS_IMETHOD GetTempPassword(const nsAString & aKey, flockILoginInfo **_retval); \
  NS_SCRIPTABLE NS_IMETHOD MakeTempPasswordPermanent(const nsAString & aKey, nsILoginInfo **_retval); \
  NS_SCRIPTABLE NS_IMETHOD MarkAllAccountsAsLoggedOut(flockIWebService *aService); \
  NS_SCRIPTABLE NS_IMETHOD SetPassword(const nsAString & aHost, const nsAString & aUser, const nsAString & aPassword); \
  NS_SCRIPTABLE NS_IMETHOD SetTempPassword(const nsAString & aKey, const nsAString & aUser, const nsAString & aPassword, const nsAString & aFormType); \
  NS_SCRIPTABLE NS_IMETHOD RemoveAllPasswordsForHost(const nsAString & aHost); \
  NS_SCRIPTABLE NS_IMETHOD RemovePassword(const nsAString & aHost, nsILoginInfo **_retval); \
  NS_SCRIPTABLE NS_IMETHOD ExtractPasswordFromHTMLForm(nsIDOMHTMLFormElement *aForm, nsILoginInfo **_retval); \
  NS_SCRIPTABLE NS_IMETHOD LoadWebDetectiveFile(const nsAString & aDetectionFileName, const nsAString & aSubDir, flockIWebDetective **_retval); \
  NS_SCRIPTABLE NS_IMETHOD RemoveCookies(nsISimpleEnumerator *aCookies); \
  NS_SCRIPTABLE NS_IMETHOD PeopleSidebarOpen(nsAString & _retval); \
  NS_SCRIPTABLE NS_IMETHOD PrimaryAccountIsHot(PRBool *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_FLOCKIACCOUNTUTILS(_to) \
  NS_SCRIPTABLE NS_IMETHOD ClearTempPassword(const nsAString & aKey) { return _to ClearTempPassword(aKey); } \
  NS_SCRIPTABLE NS_IMETHOD EnsureOnlyAuthenticatedAccount(flockIWebServiceAccount *aAccount, PRBool *_retval) { return _to EnsureOnlyAuthenticatedAccount(aAccount, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD EnsureNoAuthenticatedAccountsBeforeLogin(flockIWebServiceAccount *aAccount, PRBool *_retval) { return _to EnsureNoAuthenticatedAccountsBeforeLogin(aAccount, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetAccountById(flockIWebService *aService, const nsAString & aAccountId, flockIWebServiceAccount **_retval) { return _to GetAccountById(aService, aAccountId, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetAccountByLogin(flockIWebService *aService, const nsAString & aLogin, flockIWebServiceAccount **_retval) { return _to GetAccountByLogin(aService, aLogin, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetServiceFromShortname(const nsAString & aShortname, flockIWebService **_retval) { return _to GetServiceFromShortname(aShortname, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetWebServicesByInterface(const nsAString & aWebServiceInterface, nsISimpleEnumerator **_retval) { return _to GetWebServicesByInterface(aWebServiceInterface, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetAccountsByInterface(const nsAString & aServiceInterface, nsISimpleEnumerator **_retval) { return _to GetAccountsByInterface(aServiceInterface, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD DoAccountsExist(PRBool *_retval) { return _to DoAccountsExist(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetElementByAttribute(nsIDOMHTMLElement *aAncestorElement, const nsAString & aAttributeName, const nsAString & aAttributeValue, nsIDOMHTMLElement **_retval) { return _to GetElementByAttribute(aAncestorElement, aAttributeName, aAttributeValue, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD CreateAccount(flockIWebService *aService, const nsAString & aAccountId, const nsAString & aUsername, const nsAString & aUrl, PRBool aIsTransient, nsAString & _retval) { return _to CreateAccount(aService, aAccountId, aUsername, aUrl, aIsTransient, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD RemoveAccount(const nsAString & aAccountUrn) { return _to RemoveAccount(aAccountUrn); } \
  NS_SCRIPTABLE NS_IMETHOD RemoveAllAccounts(void) { return _to RemoveAllAccounts(); } \
  NS_SCRIPTABLE NS_IMETHOD GetCookie(const nsAString & aHost, const nsAString & aCookieName, nsAString & _retval) { return _to GetCookie(aHost, aCookieName, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetPassword(const nsAString & aKey, nsILoginInfo **_retval) { return _to GetPassword(aKey, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetFirstPasswordForHost(const nsAString & aHost, nsILoginInfo **_retval) { return _to GetFirstPasswordForHost(aHost, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetTempPassword(const nsAString & aKey, flockILoginInfo **_retval) { return _to GetTempPassword(aKey, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD MakeTempPasswordPermanent(const nsAString & aKey, nsILoginInfo **_retval) { return _to MakeTempPasswordPermanent(aKey, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD MarkAllAccountsAsLoggedOut(flockIWebService *aService) { return _to MarkAllAccountsAsLoggedOut(aService); } \
  NS_SCRIPTABLE NS_IMETHOD SetPassword(const nsAString & aHost, const nsAString & aUser, const nsAString & aPassword) { return _to SetPassword(aHost, aUser, aPassword); } \
  NS_SCRIPTABLE NS_IMETHOD SetTempPassword(const nsAString & aKey, const nsAString & aUser, const nsAString & aPassword, const nsAString & aFormType) { return _to SetTempPassword(aKey, aUser, aPassword, aFormType); } \
  NS_SCRIPTABLE NS_IMETHOD RemoveAllPasswordsForHost(const nsAString & aHost) { return _to RemoveAllPasswordsForHost(aHost); } \
  NS_SCRIPTABLE NS_IMETHOD RemovePassword(const nsAString & aHost, nsILoginInfo **_retval) { return _to RemovePassword(aHost, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD ExtractPasswordFromHTMLForm(nsIDOMHTMLFormElement *aForm, nsILoginInfo **_retval) { return _to ExtractPasswordFromHTMLForm(aForm, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD LoadWebDetectiveFile(const nsAString & aDetectionFileName, const nsAString & aSubDir, flockIWebDetective **_retval) { return _to LoadWebDetectiveFile(aDetectionFileName, aSubDir, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD RemoveCookies(nsISimpleEnumerator *aCookies) { return _to RemoveCookies(aCookies); } \
  NS_SCRIPTABLE NS_IMETHOD PeopleSidebarOpen(nsAString & _retval) { return _to PeopleSidebarOpen(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD PrimaryAccountIsHot(PRBool *_retval) { return _to PrimaryAccountIsHot(_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_FLOCKIACCOUNTUTILS(_to) \
  NS_SCRIPTABLE NS_IMETHOD ClearTempPassword(const nsAString & aKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearTempPassword(aKey); } \
  NS_SCRIPTABLE NS_IMETHOD EnsureOnlyAuthenticatedAccount(flockIWebServiceAccount *aAccount, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnsureOnlyAuthenticatedAccount(aAccount, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD EnsureNoAuthenticatedAccountsBeforeLogin(flockIWebServiceAccount *aAccount, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnsureNoAuthenticatedAccountsBeforeLogin(aAccount, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetAccountById(flockIWebService *aService, const nsAString & aAccountId, flockIWebServiceAccount **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccountById(aService, aAccountId, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetAccountByLogin(flockIWebService *aService, const nsAString & aLogin, flockIWebServiceAccount **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccountByLogin(aService, aLogin, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetServiceFromShortname(const nsAString & aShortname, flockIWebService **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServiceFromShortname(aShortname, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetWebServicesByInterface(const nsAString & aWebServiceInterface, nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWebServicesByInterface(aWebServiceInterface, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetAccountsByInterface(const nsAString & aServiceInterface, nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccountsByInterface(aServiceInterface, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD DoAccountsExist(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoAccountsExist(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetElementByAttribute(nsIDOMHTMLElement *aAncestorElement, const nsAString & aAttributeName, const nsAString & aAttributeValue, nsIDOMHTMLElement **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementByAttribute(aAncestorElement, aAttributeName, aAttributeValue, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD CreateAccount(flockIWebService *aService, const nsAString & aAccountId, const nsAString & aUsername, const nsAString & aUrl, PRBool aIsTransient, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateAccount(aService, aAccountId, aUsername, aUrl, aIsTransient, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD RemoveAccount(const nsAString & aAccountUrn) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAccount(aAccountUrn); } \
  NS_SCRIPTABLE NS_IMETHOD RemoveAllAccounts(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAllAccounts(); } \
  NS_SCRIPTABLE NS_IMETHOD GetCookie(const nsAString & aHost, const nsAString & aCookieName, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCookie(aHost, aCookieName, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetPassword(const nsAString & aKey, nsILoginInfo **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPassword(aKey, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetFirstPasswordForHost(const nsAString & aHost, nsILoginInfo **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFirstPasswordForHost(aHost, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetTempPassword(const nsAString & aKey, flockILoginInfo **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTempPassword(aKey, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD MakeTempPasswordPermanent(const nsAString & aKey, nsILoginInfo **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeTempPasswordPermanent(aKey, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD MarkAllAccountsAsLoggedOut(flockIWebService *aService) { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkAllAccountsAsLoggedOut(aService); } \
  NS_SCRIPTABLE NS_IMETHOD SetPassword(const nsAString & aHost, const nsAString & aUser, const nsAString & aPassword) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPassword(aHost, aUser, aPassword); } \
  NS_SCRIPTABLE NS_IMETHOD SetTempPassword(const nsAString & aKey, const nsAString & aUser, const nsAString & aPassword, const nsAString & aFormType) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTempPassword(aKey, aUser, aPassword, aFormType); } \
  NS_SCRIPTABLE NS_IMETHOD RemoveAllPasswordsForHost(const nsAString & aHost) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAllPasswordsForHost(aHost); } \
  NS_SCRIPTABLE NS_IMETHOD RemovePassword(const nsAString & aHost, nsILoginInfo **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemovePassword(aHost, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD ExtractPasswordFromHTMLForm(nsIDOMHTMLFormElement *aForm, nsILoginInfo **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExtractPasswordFromHTMLForm(aForm, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD LoadWebDetectiveFile(const nsAString & aDetectionFileName, const nsAString & aSubDir, flockIWebDetective **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadWebDetectiveFile(aDetectionFileName, aSubDir, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD RemoveCookies(nsISimpleEnumerator *aCookies) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveCookies(aCookies); } \
  NS_SCRIPTABLE NS_IMETHOD PeopleSidebarOpen(nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PeopleSidebarOpen(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD PrimaryAccountIsHot(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PrimaryAccountIsHot(_retval); } 

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

/* Header file */
class _MYCLASS_ : public flockIAccountUtils
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_FLOCKIACCOUNTUTILS

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* void clearTempPassword (in AString aKey); */
NS_IMETHODIMP _MYCLASS_::ClearTempPassword(const nsAString & aKey)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean ensureOnlyAuthenticatedAccount (in flockIWebServiceAccount aAccount); */
NS_IMETHODIMP _MYCLASS_::EnsureOnlyAuthenticatedAccount(flockIWebServiceAccount *aAccount, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean ensureNoAuthenticatedAccountsBeforeLogin (in flockIWebServiceAccount aAccount); */
NS_IMETHODIMP _MYCLASS_::EnsureNoAuthenticatedAccountsBeforeLogin(flockIWebServiceAccount *aAccount, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* flockIWebServiceAccount getAccountById (in flockIWebService aService, in AString aAccountId); */
NS_IMETHODIMP _MYCLASS_::GetAccountById(flockIWebService *aService, const nsAString & aAccountId, flockIWebServiceAccount **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* flockIWebServiceAccount getAccountByLogin (in flockIWebService aService, in AString aLogin); */
NS_IMETHODIMP _MYCLASS_::GetAccountByLogin(flockIWebService *aService, const nsAString & aLogin, flockIWebServiceAccount **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* flockIWebService getServiceFromShortname (in AString aShortname); */
NS_IMETHODIMP _MYCLASS_::GetServiceFromShortname(const nsAString & aShortname, flockIWebService **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISimpleEnumerator getWebServicesByInterface (in AString aWebServiceInterface); */
NS_IMETHODIMP _MYCLASS_::GetWebServicesByInterface(const nsAString & aWebServiceInterface, nsISimpleEnumerator **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISimpleEnumerator getAccountsByInterface (in AString aServiceInterface); */
NS_IMETHODIMP _MYCLASS_::GetAccountsByInterface(const nsAString & aServiceInterface, nsISimpleEnumerator **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean doAccountsExist (); */
NS_IMETHODIMP _MYCLASS_::DoAccountsExist(PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIDOMHTMLElement getElementByAttribute (in nsIDOMHTMLElement aAncestorElement, in AString aAttributeName, in AString aAttributeValue); */
NS_IMETHODIMP _MYCLASS_::GetElementByAttribute(nsIDOMHTMLElement *aAncestorElement, const nsAString & aAttributeName, const nsAString & aAttributeValue, nsIDOMHTMLElement **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AString createAccount (in flockIWebService aService, in AString aAccountId, in AString aUsername, in AString aUrl, in boolean aIsTransient); */
NS_IMETHODIMP _MYCLASS_::CreateAccount(flockIWebService *aService, const nsAString & aAccountId, const nsAString & aUsername, const nsAString & aUrl, PRBool aIsTransient, nsAString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeAccount (in AString aAccountUrn); */
NS_IMETHODIMP _MYCLASS_::RemoveAccount(const nsAString & aAccountUrn)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeAllAccounts (); */
NS_IMETHODIMP _MYCLASS_::RemoveAllAccounts()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AString getCookie (in AString aHost, in AString aCookieName); */
NS_IMETHODIMP _MYCLASS_::GetCookie(const nsAString & aHost, const nsAString & aCookieName, nsAString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsILoginInfo getPassword (in AString aKey); */
NS_IMETHODIMP _MYCLASS_::GetPassword(const nsAString & aKey, nsILoginInfo **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsILoginInfo getFirstPasswordForHost (in AString aHost); */
NS_IMETHODIMP _MYCLASS_::GetFirstPasswordForHost(const nsAString & aHost, nsILoginInfo **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* flockILoginInfo getTempPassword (in AString aKey); */
NS_IMETHODIMP _MYCLASS_::GetTempPassword(const nsAString & aKey, flockILoginInfo **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsILoginInfo makeTempPasswordPermanent (in AString aKey); */
NS_IMETHODIMP _MYCLASS_::MakeTempPasswordPermanent(const nsAString & aKey, nsILoginInfo **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void markAllAccountsAsLoggedOut (in flockIWebService aService); */
NS_IMETHODIMP _MYCLASS_::MarkAllAccountsAsLoggedOut(flockIWebService *aService)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setPassword (in AString aHost, in AString aUser, in AString aPassword); */
NS_IMETHODIMP _MYCLASS_::SetPassword(const nsAString & aHost, const nsAString & aUser, const nsAString & aPassword)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setTempPassword (in AString aKey, in AString aUser, in AString aPassword, in AString aFormType); */
NS_IMETHODIMP _MYCLASS_::SetTempPassword(const nsAString & aKey, const nsAString & aUser, const nsAString & aPassword, const nsAString & aFormType)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeAllPasswordsForHost (in AString aHost); */
NS_IMETHODIMP _MYCLASS_::RemoveAllPasswordsForHost(const nsAString & aHost)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsILoginInfo removePassword (in AString aHost); */
NS_IMETHODIMP _MYCLASS_::RemovePassword(const nsAString & aHost, nsILoginInfo **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsILoginInfo extractPasswordFromHTMLForm (in nsIDOMHTMLFormElement aForm); */
NS_IMETHODIMP _MYCLASS_::ExtractPasswordFromHTMLForm(nsIDOMHTMLFormElement *aForm, nsILoginInfo **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* flockIWebDetective loadWebDetectiveFile (in AString aDetectionFileName, in AString aSubDir); */
NS_IMETHODIMP _MYCLASS_::LoadWebDetectiveFile(const nsAString & aDetectionFileName, const nsAString & aSubDir, flockIWebDetective **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeCookies (in nsISimpleEnumerator aCookies); */
NS_IMETHODIMP _MYCLASS_::RemoveCookies(nsISimpleEnumerator *aCookies)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

/* boolean primaryAccountIsHot (); */
NS_IMETHODIMP _MYCLASS_::PrimaryAccountIsHot(PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_flockIAccountUtils_h__ */
