home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / include / abdefn.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  5.6 KB  |  201 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #ifndef _ABDefn_H_
  20. #define    _ABDefn_H_
  21.  
  22. /*  max lengths for address book fields */
  23. const int kMaxFullNameLength         = 256;    /* common name */
  24. const int kMaxNameLength             = 64;    /* given, middle, family */
  25. const int kMaxCompanyLength            = 128;    /* company name */
  26. const int kMaxLocalityLength        = 128;    /* city */
  27. const int kMaxRegionLength            = 128;    /* state */
  28. const int kMaxCountryLength            = 128;    /* state */
  29. const int kMaxEmailAddressLength     = 256;
  30. const int kMaxInfo                    = 1024;
  31. const int kMaxTitle                    = 64;
  32. const int kMaxAddress                = 128;
  33. const int kMaxZipCode                = 40;
  34. const int kMaxPhone                    = 32;
  35. const int32 kMaxDN                    = 32768;
  36. const int kMaxCoolAddress            = 256;
  37. const int kMaxAddressEntry            = 1000;
  38.  
  39. const short kDefaultDLS = 0;
  40. const short kSpecificDLS = 1;
  41. const short kHostOrIPAddress = 2;
  42.  
  43. typedef uint32 ABID;
  44.  
  45. /* This structure represents a single line in the address book pane
  46.  */
  47. typedef struct AB_EntryLineTag
  48. {
  49.     ABID        entryType;         /* type of entry either person or list */
  50.     char        fullname[256];
  51.     char        emailAddress[256];
  52.     char        companyName[128];
  53.     char        nickname[64];
  54.     char        locality[128];
  55.     char        workPhone[32];
  56. #ifdef XP_CPLUSPLUS
  57. public:
  58.         void Initialize();
  59. #endif
  60. } AB_EntryLine;
  61.  
  62. typedef struct PersonEntryTag {
  63.     char * pNickName;
  64.     char * pGivenName;
  65.     char * pMiddleName;
  66.     char * pFamilyName;
  67.     char * pCompanyName;
  68.     char * pLocality;
  69.     char * pRegion;
  70.     char * pEmailAddress;
  71.     char * pInfo;
  72.     XP_Bool    HTMLmail;
  73.     char * pTitle;
  74.     char * pPOAddress;
  75.     char * pAddress;
  76.     char * pZipCode;
  77.     char * pCountry;
  78.     char * pWorkPhone;
  79.     char * pFaxPhone;
  80.     char * pHomePhone;
  81.     char * pDistName;
  82.     short  Security;
  83.     char * pCoolAddress;
  84.     short  UseServer;
  85.     int16  WinCSID;
  86.  
  87.  
  88. #ifdef XP_CPLUSPLUS
  89. public:
  90.         void Initialize();
  91.         void CleanUp();
  92. #endif
  93. } PersonEntry; 
  94.  
  95.  
  96. typedef struct MailingListEntryTag {
  97.     char * pFullName;
  98.     char * pNickName;
  99.     char * pInfo;
  100.     char * pDistName;
  101.     int16  WinCSID;
  102.  
  103. #ifdef XP_CPLUSPLUS
  104.  
  105. public: 
  106.     void Initialize();
  107.     void CleanUp();
  108. #endif
  109. } MailingListEntry;  
  110.  
  111. const ABID    ABTypeAll        = 35;
  112. const ABID    ABTypePerson    = 36;
  113. const ABID  ABTypeList        = 37;
  114.  
  115. const unsigned long    ABTypeEntry            = 0x70634944;    /* ASCII - 'pcID' */
  116. const unsigned long    ABFullName            = 0x636E2020;    /* ASCII - 'cn  ' */
  117. const unsigned long    ABNickname            = 0x6E69636B;    /* ASCII - 'nick' */
  118. const unsigned long    ABEmailAddress        = 0x6D61696C;    /* ASCII - 'mail' */
  119. const unsigned long    ABLocality            = 0x6C6F6320;    /* ASCII - 'loc ' */
  120. const unsigned long    ABCompany            = 0x6F726720;    /* ASCII - 'org ' */
  121.  
  122. /* defines for vcard support */
  123. #define    vCardClipboardFormat        "+//ISBN 1-887687-00-9::versit::PDI//vCard"
  124. #define vCardMimeFormat                "text/x-vcard"
  125.  
  126. typedef enum
  127. {
  128.  
  129.   /* FILE MENU
  130.      =========
  131.    */
  132.   AB_NewMessageCmd,                /* Send a new message to the selected entries */
  133.  
  134.   AB_ImportCmd,                    /* import a file into the address book */
  135.  
  136.   AB_SaveCmd,                    /* export to a file */
  137.  
  138.   AB_CloseCmd,                    /* close the address book window */
  139.  
  140.   AB_NewAddressBook,            /* Create a new personal address book */
  141.  
  142.   AB_NewLDAPDirectory,            /* Create a new LDAP directory */
  143.  
  144.  
  145.   /* EDIT MENU
  146.      =========
  147.    */
  148.  
  149.   AB_UndoCmd,                    /* Undoes the last operation. */
  150.  
  151.   AB_RedoCmd,                    /* Redoes the last undone operation. */
  152.  
  153.   AB_DeleteCmd,                    /* Causes the given entries to be
  154.                                    deleted. */
  155.  
  156.   AB_DeleteAllCmd,                /* Causes all occurrences of the given entries to be deleted. */
  157.  
  158.   AB_LDAPSearchCmd,                /* Perform an LDAP search */
  159.  
  160.  
  161.   /* VIEW/SORT MENUS
  162.      ===============
  163.    */
  164.  
  165.   AB_SortByTypeCmd,                /* Sort alphabetized by type. */
  166.   AB_SortByFullNameCmd,            /* Sort alphabetizedby full name. */
  167.   AB_SortByLocality,            /* Sort by state */
  168.   AB_SortByNickname,            /* Sort by nickname */
  169.   AB_SortByEmailAddress,        /* Sort by email address */
  170.   AB_SortByCompanyName,            /* Sort by email address */
  171.   AB_SortAscending,                /* Sort current column ascending */
  172.   AB_SortDescending,            /* Sort current column descending */
  173.  
  174.   /* these are the new sort command IDs added for the 2 pane AB. Use these instead of the previous ones...*/
  175.   AB_SortByColumnID0,
  176.   AB_SortByColumnID1,
  177.   AB_SortByColumnID2,
  178.   AB_SortByColumnID3,
  179.   AB_SortByColumnID4,
  180.   AB_SortByColumnID5,
  181.   AB_SortByColumnID6,
  182.  
  183.   /* ITEM MENU
  184.      ============
  185.    */
  186.  
  187.    AB_AddUserCmd,                /* Add a user to the address book */
  188.    AB_AddMailingListCmd,        /* Add a mailing list to the address book */
  189.    AB_PropertiesCmd,            /* Get the properties of an entry */
  190.    AB_CallCmd,                    /* Call the entry using CallPoint */
  191.  
  192.    AB_ImportLdapEntriesCmd,        /* Add a user to the AB from an LDAP directory */
  193.  
  194.    /* Mailing List Pane Specific Commands!!! */
  195.    AB_InsertLineCmd,            /* Insert a blank entry line into the mailing list pane */
  196.    AB_ReplaceLineCmd            /* Replace the entry in the mailing list pane with a blank entry */
  197.  
  198. } AB_CommandType;
  199.  
  200. #endif
  201.