first addition of account/identity interfaces, with IDL

This commit is contained in:
alecf%netscape.com 1999-04-06 22:35:13 +00:00
parent fa59f41780
commit 6d8f88f1e8
11 changed files with 506 additions and 0 deletions

View File

@ -0,0 +1,62 @@
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM nsIMsgAccount.idl
*/
#ifndef __gen_nsIMsgAccount_h__
#define __gen_nsIMsgAccount_h__
#include "nsISupports.h" /* interface nsISupports */
#include "nsIMsgIncomingServer.h" /* interface nsIMsgIncomingServer */
#include "nsIMsgSignature.h" /* interface nsIMsgSignature */
#include "nsIMsgIdentity.h" /* interface nsIMsgIdentity */
#include "nsIMsgVCard.h" /* interface nsIMsgVCard */
#include "nsIPref.h" /* interface nsIPref */
#include "nsIEnumerator.h" /* interface nsIEnumerator */
#include "nsID.h" /* interface nsID */
#ifdef XPIDL_JS_STUBS
#include "jsapi.h"
#endif
/* starting interface: nsIMsgAccount */
/* {da368bd0-e624-11d2-b7fc-00805f05ffa5} */
#define NS_IMSGACCOUNT_IID_STR "da368bd0-e624-11d2-b7fc-00805f05ffa5"
#define NS_IMSGACCOUNT_IID \
{0xda368bd0, 0xe624, 0x11d2, \
{ 0xb7, 0xfc, 0x00, 0x80, 0x5f, 0x05, 0xff, 0xa5 }}
class nsIMsgAccount : public nsISupports {
public:
static const nsIID& GetIID() {
static nsIID iid = NS_IMSGACCOUNT_IID;
return iid;
}
/* attribute nsIMsgIncomingServer incomingServer; */
NS_IMETHOD GetIncomingServer(nsIMsgIncomingServer * *aIncomingServer) = 0;
NS_IMETHOD SetIncomingServer(nsIMsgIncomingServer * aIncomingServer) = 0;
/* nsIEnumerator getIdentities (); */
NS_IMETHOD getIdentities(nsIEnumerator **_retval) = 0;
/* attribute nsIMsgIdentity defaultIdentity; */
NS_IMETHOD GetDefaultIdentity(nsIMsgIdentity * *aDefaultIdentity) = 0;
NS_IMETHOD SetDefaultIdentity(nsIMsgIdentity * aDefaultIdentity) = 0;
/* void addIdentity (in nsIMsgIdentity identity); */
NS_IMETHOD addIdentity(nsIMsgIdentity *identity) = 0;
/* void removeIdentity (in nsIMsgIdentity identity); */
NS_IMETHOD removeIdentity(nsIMsgIdentity *identity) = 0;
/* void LoadPreferences (in nsIPref prefs, in string accountKey); */
NS_IMETHOD LoadPreferences(nsIPref *prefs, const char *accountKey) = 0;
#ifdef XPIDL_JS_STUBS
static NS_EXPORT_(JSObject *) InitJSClass(JSContext *cx);
static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsIMsgAccount *priv);
#endif
};
#endif /* __gen_nsIMsgAccount_h__ */

View File

@ -0,0 +1,44 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsISupports.idl"
#include "nsIMsgIncomingServer.idl"
#include "nsIMsgIdentity.idl"
#include "nsIEnumerator.idl"
#include "nsIPref.idl"
/* an account consists of an incoming server and one or more
outgoing identities
*/
[object, uuid(da368bd0-e624-11d2-b7fc-00805f05ffa5)]
interface nsIMsgAccount : nsISupports {
/* incoming server stuff */
attribute nsIMsgIncomingServer incomingServer;
/* outgoing identity list */
nsIEnumerator getIdentities();
attribute nsIMsgIdentity defaultIdentity;
void addIdentity(in nsIMsgIdentity identity);
void removeIdentity(in nsIMsgIdentity identity);
void LoadPreferences(in nsIPref prefs, in string accountKey);
};

View File

@ -0,0 +1,71 @@
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM nsIMsgAccountManager.idl
*/
#ifndef __gen_nsIMsgAccountManager_h__
#define __gen_nsIMsgAccountManager_h__
#include "nsISupports.h" /* interface nsISupports */
#include "nsIMsgIncomingServer.h" /* interface nsIMsgIncomingServer */
#include "nsIMsgSignature.h" /* interface nsIMsgSignature */
#include "nsIMsgIdentity.h" /* interface nsIMsgIdentity */
#include "nsIMsgVCard.h" /* interface nsIMsgVCard */
#include "nsIMsgAccount.h" /* interface nsIMsgAccount */
#include "nsIPref.h" /* interface nsIPref */
#include "nsIEnumerator.h" /* interface nsIEnumerator */
#include "nsID.h" /* interface nsID */
#ifdef XPIDL_JS_STUBS
#include "jsapi.h"
#endif
/* starting interface: nsIMsgAccountManager */
/* {6ed2cc00-e623-11d2-b7fc-00805f05ffa5} */
#define NS_IMSGACCOUNTMANAGER_IID_STR "6ed2cc00-e623-11d2-b7fc-00805f05ffa5"
#define NS_IMSGACCOUNTMANAGER_IID \
{0x6ed2cc00, 0xe623, 0x11d2, \
{ 0xb7, 0xfc, 0x00, 0x80, 0x5f, 0x05, 0xff, 0xa5 }}
class nsIMsgAccountManager : public nsISupports {
public:
static const nsIID& GetIID() {
static nsIID iid = NS_IMSGACCOUNTMANAGER_IID;
return iid;
}
/* nsIMsgAccount createAccount (in nsIMsgIncomingServer server, in nsIMsgIdentity identity); */
NS_IMETHOD createAccount(nsIMsgIncomingServer *server, nsIMsgIdentity *identity, nsIMsgAccount **_retval) = 0;
/* nsIMsgAccount createAccountWithKey (in nsIMsgIncomingServer server, in nsIMsgIdentity identity, in string accountKey); */
NS_IMETHOD createAccountWithKey(nsIMsgIncomingServer *server, nsIMsgIdentity *identity, const char *accountKey, nsIMsgAccount **_retval) = 0;
/* void addAccount (in nsIMsgAccount account, in string accountKey); */
NS_IMETHOD addAccount(nsIMsgAccount *account, const char *accountKey) = 0;
/* attribute nsIMsgAccount defaultAccount; */
NS_IMETHOD GetDefaultAccount(nsIMsgAccount * *aDefaultAccount) = 0;
NS_IMETHOD SetDefaultAccount(nsIMsgAccount * aDefaultAccount) = 0;
/* nsIEnumerator getAccounts (); */
NS_IMETHOD getAccounts(nsIEnumerator **_retval) = 0;
/* string getAccountKey (in nsIMsgAccount account); */
NS_IMETHOD getAccountKey(nsIMsgAccount *account, char **_retval) = 0;
/* nsIEnumerator getAllIdentities (); */
NS_IMETHOD getAllIdentities(nsIEnumerator **_retval) = 0;
/* nsIEnumerator getAllServers (); */
NS_IMETHOD getAllServers(nsIEnumerator **_retval) = 0;
/* void LoadAccounts (); */
NS_IMETHOD LoadAccounts() = 0;
#ifdef XPIDL_JS_STUBS
static NS_EXPORT_(JSObject *) InitJSClass(JSContext *cx);
static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsIMsgAccountManager *priv);
#endif
};
#endif /* __gen_nsIMsgAccountManager_h__ */

View File

@ -0,0 +1,56 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsISupports.idl"
#include "nsIMsgAccount.idl"
#include "nsIMsgIdentity.idl"
#include "nsIMsgIncomingServer.idl"
[object, uuid(6ed2cc00-e623-11d2-b7fc-00805f05ffa5)]
interface nsIMsgAccountManager : nsISupports {
/* createAccount creates a new account and assigns a new accountKey */
nsIMsgAccount createAccount(in nsIMsgIncomingServer server,
in nsIMsgIdentity identity);
/* similar to createAccount, but we already know the account key */
nsIMsgAccount createAccountWithKey(in nsIMsgIncomingServer server,
in nsIMsgIdentity identity,
in string accountKey);
void addAccount(in nsIMsgAccount account, in string accountKey);
/* account list stuff */
/* defaultAccount should always be set if there are any accounts
* in the account manager. You can only set the defaultAccount to an
* account already in the account manager */
attribute nsIMsgAccount defaultAccount;
nsIEnumerator getAccounts();
/* Each account will have a unique key, which should not change
* for the life of the account. */
string getAccountKey(in nsIMsgAccount account);
/* utility routines to enumerate elements in all accounts */
nsIEnumerator getAllIdentities();
nsIEnumerator getAllServers();
void LoadAccounts();
};

View File

@ -0,0 +1,40 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsISupports.idl"
#include "nsIMsgSignature.idl"
#include "nsIMsgVCard.idl"
#include "nsIPref.idl"
[object, uuid(D3B4A420-D5AC-11d2-806A-006008128C4E)]
interface nsIMsgIdentity : nsISupports {
attribute string identityName;
attribute string fullName;
attribute string email;
attribute string replyTo;
attribute string organization;
attribute boolean useHtml;
attribute nsIMsgSignature signature;
attribute nsIMsgVCard vCard;
attribute string smtpHostname;
attribute string smtpUsername;
attribute string key;
void LoadPreferences(in nsIPref prefs, in string identityKey);
};

View File

@ -0,0 +1,64 @@
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM nsIMsgIncomingServer.idl
*/
#ifndef __gen_nsIMsgIncomingServer_h__
#define __gen_nsIMsgIncomingServer_h__
#include "nsISupports.h" /* interface nsISupports */
#include "nsIPref.h" /* interface nsIPref */
#include "nsID.h" /* interface nsID */
#ifdef XPIDL_JS_STUBS
#include "jsapi.h"
#endif
/* starting interface: nsIMsgIncomingServer */
/* {60dcb100-e3f2-11d2-b7fc-00805f05ffa5} */
#define NS_IMSGINCOMINGSERVER_IID_STR "60dcb100-e3f2-11d2-b7fc-00805f05ffa5"
#define NS_IMSGINCOMINGSERVER_IID \
{0x60dcb100, 0xe3f2, 0x11d2, \
{ 0xb7, 0xfc, 0x00, 0x80, 0x5f, 0x05, 0xff, 0xa5 }}
class nsIMsgIncomingServer : public nsISupports {
public:
static const nsIID& GetIID() {
static nsIID iid = NS_IMSGINCOMINGSERVER_IID;
return iid;
}
/* attribute string prettyName; */
NS_IMETHOD GetPrettyName(char * *aPrettyName) = 0;
NS_IMETHOD SetPrettyName(char * aPrettyName) = 0;
/* attribute string hostName; */
NS_IMETHOD GetHostName(char * *aHostName) = 0;
NS_IMETHOD SetHostName(char * aHostName) = 0;
/* attribute string userName; */
NS_IMETHOD GetUserName(char * *aUserName) = 0;
NS_IMETHOD SetUserName(char * aUserName) = 0;
/* attribute string password; */
NS_IMETHOD GetPassword(char * *aPassword) = 0;
NS_IMETHOD SetPassword(char * aPassword) = 0;
/* attribute boolean doBiff; */
NS_IMETHOD GetDoBiff(PRBool *aDoBiff) = 0;
NS_IMETHOD SetDoBiff(PRBool aDoBiff) = 0;
/* attribute long biffMinutes; */
NS_IMETHOD GetBiffMinutes(PRInt32 *aBiffMinutes) = 0;
NS_IMETHOD SetBiffMinutes(PRInt32 aBiffMinutes) = 0;
/* void LoadPreferences (in nsIPref prefs, in string identityKey); */
NS_IMETHOD LoadPreferences(nsIPref *prefs, const char *identityKey) = 0;
#ifdef XPIDL_JS_STUBS
static NS_EXPORT_(JSObject *) InitJSClass(JSContext *cx);
static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsIMsgIncomingServer *priv);
#endif
};
#endif /* __gen_nsIMsgIncomingServer_h__ */

View File

@ -0,0 +1,36 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsISupports.idl"
#include "nsIPref.idl"
/* Interface for incoming mail/news host */
[object, uuid(60dcb100-e3f2-11d2-b7fc-00805f05ffa5)]
interface nsIMsgIncomingServer : nsISupports {
attribute string prettyName;
attribute string hostName;
attribute string userName;
attribute string password;
attribute boolean doBiff;
attribute long biffMinutes;
void LoadPreferences(in nsIPref prefs, in string identityKey);
};

View File

@ -0,0 +1,44 @@
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM nsIMsgSignature.idl
*/
#ifndef __gen_nsIMsgSignature_h__
#define __gen_nsIMsgSignature_h__
#include "nsISupports.h" /* interface nsISupports */
#include "nsID.h" /* interface nsID */
#ifdef XPIDL_JS_STUBS
#include "jsapi.h"
#endif
/* starting interface: nsIMsgSignature */
/* {7e1531b0-e3df-11d2-b7fc-00805f05ffa5} */
#define NS_IMSGSIGNATURE_IID_STR "7e1531b0-e3df-11d2-b7fc-00805f05ffa5"
#define NS_IMSGSIGNATURE_IID \
{0x7e1531b0, 0xe3df, 0x11d2, \
{ 0xb7, 0xfc, 0x00, 0x80, 0x5f, 0x05, 0xff, 0xa5 }}
class nsIMsgSignature : public nsISupports {
public:
static const nsIID& GetIID() {
static nsIID iid = NS_IMSGSIGNATURE_IID;
return iid;
}
/* attribute string signatureName; */
NS_IMETHOD GetSignatureName(char * *aSignatureName) = 0;
NS_IMETHOD SetSignatureName(char * aSignatureName) = 0;
/* attribute string signature; */
NS_IMETHOD GetSignature(char * *aSignature) = 0;
NS_IMETHOD SetSignature(char * aSignature) = 0;
#ifdef XPIDL_JS_STUBS
static NS_EXPORT_(JSObject *) InitJSClass(JSContext *cx);
static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsIMsgSignature *priv);
#endif
};
#endif /* __gen_nsIMsgSignature_h__ */

View File

@ -0,0 +1,26 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsISupports.idl"
[object, uuid(7e1531b0-e3df-11d2-b7fc-00805f05ffa5)]
interface nsIMsgSignature : nsISupports {
attribute string signatureName;
attribute string signature;
};

View File

@ -0,0 +1,36 @@
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM nsIMsgVCard.idl
*/
#ifndef __gen_nsIMsgVCard_h__
#define __gen_nsIMsgVCard_h__
#include "nsISupports.h" /* interface nsISupports */
#include "nsID.h" /* interface nsID */
#ifdef XPIDL_JS_STUBS
#include "jsapi.h"
#endif
/* starting interface: nsIMsgVCard */
/* {e0e67ec0-e3df-11d2-b7fc-00805f05ffa5} */
#define NS_IMSGVCARD_IID_STR "e0e67ec0-e3df-11d2-b7fc-00805f05ffa5"
#define NS_IMSGVCARD_IID \
{0xe0e67ec0, 0xe3df, 0x11d2, \
{ 0xb7, 0xfc, 0x00, 0x80, 0x5f, 0x05, 0xff, 0xa5 }}
class nsIMsgVCard : public nsISupports {
public:
static const nsIID& GetIID() {
static nsIID iid = NS_IMSGVCARD_IID;
return iid;
}
#ifdef XPIDL_JS_STUBS
static NS_EXPORT_(JSObject *) InitJSClass(JSContext *cx);
static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsIMsgVCard *priv);
#endif
};
#endif /* __gen_nsIMsgVCard_h__ */

View File

@ -0,0 +1,27 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsISupports.idl"
[object, uuid(e0e67ec0-e3df-11d2-b7fc-00805f05ffa5)]
interface nsIMsgVCard : nsISupports {
};