1999-04-07 02:34:19 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
1999-10-05 09:53:31 +04:00
|
|
|
#ifndef nsMsgIncomingServer_h__
|
|
|
|
#define nsMsgIncomingServer_h__
|
|
|
|
|
1999-04-07 02:34:19 +04:00
|
|
|
#include "nsIMsgIncomingServer.h"
|
1999-04-16 04:36:52 +04:00
|
|
|
#include "nsIPref.h"
|
1999-05-19 03:55:39 +04:00
|
|
|
#include "msgCore.h"
|
1999-05-27 03:56:21 +04:00
|
|
|
#include "nsIFolder.h"
|
|
|
|
#include "nsCOMPtr.h"
|
1999-07-17 07:26:24 +04:00
|
|
|
|
|
|
|
class nsIMsgFolderCache;
|
|
|
|
|
1999-04-07 02:34:19 +04:00
|
|
|
/*
|
|
|
|
* base class for nsIMsgIncomingServer - derive your class from here
|
|
|
|
* if you want to get some free implementation
|
|
|
|
*
|
|
|
|
* this particular implementation is not meant to be used directly.
|
|
|
|
*/
|
|
|
|
|
1999-05-19 03:55:39 +04:00
|
|
|
class NS_MSG_BASE nsMsgIncomingServer : public nsIMsgIncomingServer {
|
1999-04-07 02:34:19 +04:00
|
|
|
public:
|
|
|
|
nsMsgIncomingServer();
|
|
|
|
virtual ~nsMsgIncomingServer();
|
|
|
|
|
1999-09-09 08:11:38 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
1999-04-07 02:34:19 +04:00
|
|
|
|
1999-09-09 08:11:38 +04:00
|
|
|
NS_DECL_NSIMSGINCOMINGSERVER
|
1999-06-15 07:47:59 +04:00
|
|
|
|
1999-04-11 00:55:30 +04:00
|
|
|
private:
|
|
|
|
nsIPref *m_prefs;
|
|
|
|
char *m_serverKey;
|
1999-08-31 08:39:43 +04:00
|
|
|
nsCString m_password;
|
1999-08-31 10:52:27 +04:00
|
|
|
PRBool m_serverBusy;
|
1999-04-07 02:34:19 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
char *getPrefName(const char *serverKey, const char *pref);
|
1999-04-11 00:55:30 +04:00
|
|
|
char *getDefaultPrefName(const char *pref);
|
1999-08-31 08:39:43 +04:00
|
|
|
|
|
|
|
// these are private pref getters and setters for the password
|
|
|
|
// field. Callers should be using Get/Set Password
|
|
|
|
NS_IMETHOD GetPrefPassword(char * *aPassword);
|
1999-09-20 03:46:35 +04:00
|
|
|
NS_IMETHOD SetPrefPassword(const char * aPassword);
|
1999-04-07 02:34:19 +04:00
|
|
|
|
1999-05-27 03:56:21 +04:00
|
|
|
nsCOMPtr <nsIFolder> m_rootFolder;
|
1999-04-11 00:55:30 +04:00
|
|
|
nsresult getDefaultCharPref(const char *pref, char **);
|
|
|
|
nsresult getDefaultBoolPref(const char *pref, PRBool *);
|
|
|
|
nsresult getDefaultIntPref(const char *pref, PRInt32 *);
|
1999-09-09 08:11:38 +04:00
|
|
|
|
|
|
|
nsresult CreateRootFolder();
|
1999-08-31 02:12:20 +04:00
|
|
|
|
1999-04-07 02:34:19 +04:00
|
|
|
};
|
|
|
|
|
1999-10-05 09:53:31 +04:00
|
|
|
#endif // nsMsgIncomingServer_h__
|