home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************
- Copyright © 1995 - 1998, 3Com Corporation or its subsidiaries ("3Com").
- All rights reserved.
-
- This software may be copied and used solely for developing products for
- the Palm Computing platform and for archival and backup purposes. Except
- for the foregoing, no part of this software may be reproduced or transmitted
- in any form or by any means or used to make any derivative work (such as
- translation, transformation or adaptation) without express written consent
- from 3Com.
-
- 3Com reserves the right to revise this software and to make changes in content
- from time to time without obligation on the part of 3Com to provide notification
- of such revision or changes.
- 3COM MAKES NO REPRESENTATIONS OR WARRANTIES THAT THE SOFTWARE IS FREE OF ERRORS
- OR THAT THE SOFTWARE IS SUITABLE FOR YOUR USE. THE SOFTWARE IS PROVIDED ON AN
- "AS IS" BASIS. 3COM MAKES NO WARRANTIES, TERMS OR CONDITIONS, EXPRESS OR IMPLIED,
- EITHER IN FACT OR BY OPERATION OF LAW, STATUTORY OR OTHERWISE, INCLUDING WARRANTIES,
- TERMS, OR CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
- SATISFACTORY QUALITY.
-
- TO THE FULL EXTENT ALLOWED BY LAW, 3COM ALSO EXCLUDES FOR ITSELF AND ITS SUPPLIERS
- ANY LIABILITY, WHETHER BASED IN CONTRACT OR TORT (INCLUDING NEGLIGENCE), FOR
- DIRECT, INCIDENTAL, CONSEQUENTIAL, INDIRECT, SPECIAL, OR PUNITIVE DAMAGES OF
- ANY KIND, OR FOR LOSS OF REVENUE OR PROFITS, LOSS OF BUSINESS, LOSS OF INFORMATION
- OR DATA, OR OTHER FINANCIAL LOSS ARISING OUT OF OR IN CONNECTION WITH THIS SOFTWARE,
- EVEN IF 3COM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
- 3Com, HotSync, Palm Computing, and Graffiti are registered trademarks, and
- Palm III and Palm OS are trademarks of 3Com Corporation or its subsidiaries.
-
- IF THIS SOFTWARE IS PROVIDED ON A COMPACT DISK, THE OTHER SOFTWARE AND
- DOCUMENTATION ON THE COMPACT DISK ARE SUBJECT TO THE LICENSE AGREEMENT
- ACCOMPANYING THE COMPACT DISK.
-
- *-------------------------------------------------------------------
- * FileName:
- * Address.h
- *
- * Description:
- * Header for the Address Book.
- *
- * History:
- * 4/24/97 roger - Created
- *
- *******************************************************************/
-
-
- #include <IMCUtils.h>
- #include <ExgMgr.h>
-
- #include "AddressDB.h"
-
-
-
- /***********************************************************************
- *
- * Internal Constants
- *
- ***********************************************************************/
-
- #define addrVersionNum 0x03
- #define addrPrefVersionNum 0x03
- #define addrPrefID 0x00
- #define addrDBName "AddressDB"
- #define addrDBType 'DATA'
-
- #define shortenedFieldString "..."
- #define shortenedFieldLength 3
- #define fieldSeparatorString ", "
- #define fieldSeparatorLength 2
- #define spaceBetweenNamesAndPhoneNumbers 6
-
- // Address lookup table columns
- #define field1Column 0
- #define field2Column 1
-
-
-
- /***********************************************************************
- *
- * Internal Structures
- *
- ***********************************************************************/
-
- // The Lookup command is called while another app is running. Because of
- // of this the other app and not the Address Book has global variables.
- // All the variables the lookup command needs as globals are therefore
- // kept in this structure.
- typedef struct
- {
- AddrLookupParamsPtr params;
- FormPtr frm;
- DmOpenRef dbP;
- Boolean hideSecretRecords;
- Word currentRecord;
- Word currentPhone;
- Word topVisibleRecord;
- Word topVisibleRecordPhone;
- Boolean sortByCompany;
- Boolean ignoreEmptyLookupField;
- AddressFields lookupFieldMap[addrLookupNoField];
- Char phoneLabelLetters[numPhoneLabels];
- } LookupVariablesType;
-
- typedef LookupVariablesType * LookupVariablesPtr;
-
-
-
-
-
- /************************************************************
- * Global Variables
- *************************************************************/
-
- extern Boolean SortByCompany;
-
-
- /************************************************************
- * Function Prototypes
- *************************************************************/
- #ifdef __cplusplus
- extern "C" {
- #endif
-
-
- // From Address.c
- extern Boolean DetermineRecordName (AddrDBRecordPtr recordP,
- UInt *shortenedFieldWidth, UInt *fieldSeparatorWidth, Boolean sortByCompany,
- CharPtr *name1, Int *name1Length, Int *name1Width,
- CharPtr *name2, Int *name2Length, Int *name2Width,
- CharPtr *unnamedRecordStringPtr, UInt nameExtent);
-
- extern void DrawRecordName (
- CharPtr name1, Int name1Length, Int name1Width,
- CharPtr name2, Int name2Length, Int name2Width,
- UInt nameExtent, SWord *x, SWord y, UInt shortenedFieldWidth,
- UInt fieldSeparatorWidth, Boolean center, Boolean priorityIsName1);
-
- extern void InitPhoneLabelLetters(AddrAppInfoPtr appInfoPtr, CharPtr phoneLabelLetters);
- extern VoidPtr GetObjectPtr (Word objectID);
-
- // From AddressLookup.c
- extern void Lookup (AddrLookupParamsType * params);
-
-
- // From AddressTransfer.c
- extern void AddrSendRecord (DmOpenRef dbP, Int recordNum);
- extern void AddrSendCategory (DmOpenRef dbP, Word categoryNum);
- extern Err AddrReceiveData(DmOpenRef dbP, ExgSocketPtr obxSocketP);
- extern Boolean AddrImportVCard(DmOpenRef dbP, VoidPtr inputStream, GetCharF inputFunc,
- Boolean obeyUniqueIDs, Boolean beginAlreadyRead);
- extern void AddrExportVCard(DmOpenRef dbP, Int index, AddrDBRecordType *recordP,
- const VoidPtr outputStream, const PutStringF outputFunc, Boolean writeUniqueIDs);
- extern void AddrRegisterData ();
-
-
- #ifdef __cplusplus
- }
- #endif
-
-