4 * $TOG: DtMailValues.hh /main/7 1997/09/03 17:27:15 mgreess $
6 * RESTRICTED CONFIDENTIAL INFORMATION:
8 * The information in this document is subject to special
9 * restrictions in a confidential disclosure agreementbertween
10 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
11 * document outside HP, IBM, Sun, USL, SCO, or Univel wihtout
12 * Sun's specific written approval. This documment and all copies
13 * and derivative works thereof must be returned or destroyed at
16 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
21 #ifndef _DTMAILVALUE_HH
22 #define _DTMAILVALUE_HH
24 #include <DtMail/DtVirtArray.hh>
26 // Dates consist of a date, and an offset from GMT.
30 struct DtMailValueDate : public DtCPlusPlusAllocator {
32 time_t dtm_tz_offset_secs;
35 // An address consists of 3 components. The addressee is the string that
36 // is used by the transport to deliver the mail to the user. The person
37 // is the string that represents this person in the real world (e.g. Bob Patterson).
38 // The namespace is used to identify which address space the name belongs to.
39 // This can be set to DtMailAddressDefault to specify the library should figure
40 // out the appropriate name space.
43 #define DtMailAddressDefault "Dt:Mail:Address:Default"
45 struct DtMailValueAddress : public DtCPlusPlusAllocator {
50 DtMailValueAddress(void);
51 DtMailValueAddress(const DtMailValueAddress &);
52 DtMailValueAddress(const char * address,
54 const char * nameSpace);
56 DtMailValueAddress(const char * address, const int addr_len,
57 const char * person, const int per_len,
58 const char * nameSpace);
59 ~DtMailValueAddress(void);
62 class DtMailAddressSeq : public DtVirtArray<DtMailValueAddress *> {
64 DtMailAddressSeq(int size = 8);
65 ~DtMailAddressSeq(void);
68 class DtMailValue : public DtCPlusPlusAllocator {
70 DtMailValue(const char * value);
71 virtual ~DtMailValue(void);
73 virtual operator const char *(void);
75 virtual const char * operator= (const char *);
77 virtual DtMailValueDate toDate(void);
79 virtual void fromDate(const DtMailValueDate &);
80 #endif /* DEAD_WOOD */
82 virtual DtMailAddressSeq * toAddress(void);
84 virtual void fromAddress(const DtMailAddressSeq & list);
85 #endif /* DEAD_WOOD */
87 // This method gives the raw format used to store the value.
89 virtual const char * raw(void);
95 class DtMailValueSeq : public DtVirtArray<DtMailValue *> {
97 DtMailValueSeq(int size = 8);
98 ~DtMailValueSeq(void);