1 /* $TOG: PropSource.hh /main/6 1997/11/13 13:26:08 mgreess $ */
5 * RESTRICTED CONFIDENTIAL INFORMATION:
7 * The information in this document is subject to special
8 * restrictions in a confidential disclosure agreement bertween
9 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
10 * document outside HP, IBM, Sun, USL, SCO, or Univel wihtout
11 * Sun's specific written approval. This documment and all copies
12 * and derivative works thereof must be returned or destroyed at
15 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
21 #include <DtMail/DtMailTypes.h>
22 #include <DtMail/DtVirtArray.hh>
24 #ifndef _PROPSOURCE_HH
25 #define _PROPSOURCE_HH
32 // Virtual class is base class for props data accessing funcs
33 ////////////////////////////////////////////////////////////////
38 #define PropSourceDEFAULTVALUE " "
40 PropSource(DtMail::MailRc *m_rc, char *key);
41 virtual ~PropSource();
43 virtual const char *getValue(DtMailBoolean decrypt = DTM_FALSE) = 0;
44 virtual void setValue(char*, DtMailBoolean encrypt=DTM_FALSE) = 0;
46 static void setDefaultValue(char *key, char *value);
47 virtual const char *getDefaultValue(void);
48 virtual DtMail::MailRc *getMailRc(void) { return _mail_rc; };
52 char *_key; // just a pointer NOT our memory
53 DtMail::MailRc *_mail_rc;
54 static DtVirtArray<PropDefaults*>
60 // Accesses the mailrc hash tables...
61 /////////////////////////////////////////////////////////////////
63 class MailRcSource : public PropSource {
67 MailRcSource(DtMail::MailRc *m_rc, char *key) : PropSource(m_rc, key) {;};
68 virtual ~MailRcSource() {;}
70 virtual const char *getValue(DtMailBoolean decrypt = DTM_FALSE);
71 virtual void setValue(char *value, DtMailBoolean encrypt = DTM_TRUE);