1 /* 2 * Copyright (C) 2022 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 3. Neither the name of the copyright holders nor the names of 14 * contributors may be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * 4. Any redistribution, use, or modification is done solely for 17 * personal benefit and not for any commercial purpose or for 18 * monetary gain. 19 * 20 * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEKITCHEN 24 * GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * Please inquire about commercial licensing options at 34 * [email protected] 35 * 36 */ 37 38 /** 39 * @title PBAP Client 40 * 41 */ 42 43 #ifndef PBAP_H 44 #define PBAP_H 45 46 #if defined __cplusplus 47 extern "C" { 48 #endif 49 50 /* API_START */ 51 52 // PBAP Supported Features 53 54 #define PBAP_SUPPORTED_FEATURES_DOWNLOAD (1<<0) 55 #define PBAP_SUPPORTED_FEATURES_BROWSING (1<<1) 56 #define PBAP_SUPPORTED_FEATURES_DATABASE_IDENTIFIER (1<<2) 57 #define PBAP_SUPPORTED_FEATURES_FOLDER_VERSION_COUNTERS (1<<3) 58 #define PBAP_SUPPORTED_FEATURES_VCARD_SELECTING (1<<4) 59 #define PBAP_SUPPORTED_FEATURES_ENHANCED_MISSED_CALLS (1<<5) 60 #define PBAP_SUPPORTED_FEATURES_X_BT_UCI_VCARD_PROPERTY (1<<6) 61 #define PBAP_SUPPORTED_FEATURES_X_BT_UID_VCARD_PROPERTY (1<<7) 62 #define PBAP_SUPPORTED_FEATURES_CONTACT_REFERENCING (1<<8) 63 #define PBAP_SUPPORTED_FEATURES_DEFAULT_CONTACT_IMAGE_FORMAT (1<<9) 64 65 // PBAP Property Mask - also used for vCardSelector 66 #define PBAP_PROPERTY_MASK_VERSION (1<< 0) // vCard Version 67 #define PBAP_PROPERTY_MASK_FN (1<< 1) // Formatted Name 68 #define PBAP_PROPERTY_MASK_N (1<< 2) // Structured Presentation of Name 69 #define PBAP_PROPERTY_MASK_PHOTO (1<< 3) // Associated Image or Photo 70 #define PBAP_PROPERTY_MASK_BDAY (1<< 4) // Birthday 71 #define PBAP_PROPERTY_MASK_ADR (1<< 5) // Delivery Address 72 #define PBAP_PROPERTY_MASK_LABEL (1<< 6) // Delivery 73 #define PBAP_PROPERTY_MASK_TEL (1<< 7) // Telephone Number 74 #define PBAP_PROPERTY_MASK_EMAIL (1<< 8) // Electronic Mail Address 75 #define PBAP_PROPERTY_MASK_MAILER (1<< 9) // Electronic Mail 76 #define PBAP_PROPERTY_MASK_TZ (1<<10) // Time Zone 77 #define PBAP_PROPERTY_MASK_GEO (1<<11) // Geographic Position 78 #define PBAP_PROPERTY_MASK_TITLE (1<<12) // Job 79 #define PBAP_PROPERTY_MASK_ROLE (1<<13) // Role within the Organization 80 #define PBAP_PROPERTY_MASK_LOGO (1<<14) // Organization Logo 81 #define PBAP_PROPERTY_MASK_AGENT (1<<15) // vCard of Person Representing 82 #define PBAP_PROPERTY_MASK_ORG (1<<16) // Name of Organization 83 #define PBAP_PROPERTY_MASK_NOTE (1<<17) // Comments 84 #define PBAP_PROPERTY_MASK_REV (1<<18) // Revision 85 #define PBAP_PROPERTY_MASK_SOUND (1<<19) // Pronunciation of Name 86 #define PBAP_PROPERTY_MASK_URL (1<<20) // Uniform Resource Locator 87 #define PBAP_PROPERTY_MASK_UID (1<<21) // Unique ID 88 #define PBAP_PROPERTY_MASK_KEY (1<<22) // Public Encryption Key 89 #define PBAP_PROPERTY_MASK_NICKNAME (1<<23) // Nickname 90 #define PBAP_PROPERTY_MASK_CATEGORIES (1<<24) // Categories 91 #define PBAP_PROPERTY_MASK_PROID (1<<25) // Product ID 92 #define PBAP_PROPERTY_MASK_CLASS (1<<26) // Class information 93 #define PBAP_PROPERTY_MASK_SORT_STRING (1<<27) // String used for sorting operations 94 #define PBAP_PROPERTY_MASK_X_IRMC_CALL_DATETIME (1<<28) // Time stamp 95 #define PBAP_PROPERTY_MASK_X_BT_SPEEDDIALKEY (1<<29) // Speed-dial shortcut 96 #define PBAP_PROPERTY_MASK_X_BT_UCI (1<<30) // Uniform Caller Identifier 97 #define PBAP_PROPERTY_MASK_X_BT_UID (1<<31) // Bluetooth Contact Unique Identifier 98 99 // PBAP vCardSelectorOperator 100 #define PBAP_VCARD_SELECTOR_OPERATOR_OR 0 101 #define PBAP_VCARD_SELECTOR_OPERATOR_AND 1 102 103 // PBAP Format 104 typedef enum { 105 PBAP_FORMAT_VCARD_21 = 0, 106 PBAP_FORMAT_VCRAD_30 107 } pbap_format_vcard_t; 108 109 // PBAP Object Types 110 typedef enum { 111 PBAP_OBJECT_TYPE_INVALID = 0, 112 PBAP_OBJECT_TYPE_PHONEBOOOK, 113 PBAP_OBJECT_TYPE_VCARD_LISTING, 114 PBAP_OBJECT_TYPE_VCARD, 115 } pbap_object_type_t; 116 117 // PBAP Phonebooks 118 typedef enum { 119 PBAP_PHONEBOOK_INVALID = 0, 120 PBAP_PHONEBOOK_TELECOM_CCH, 121 PBAP_PHONEBOOK_TELECOM_FAV, 122 PBAP_PHONEBOOK_TELECOM_ICH, 123 PBAP_PHONEBOOK_TELECOM_MCH, 124 PBAP_PHONEBOOK_TELECOM_OCH, 125 PBAP_PHONEBOOK_TELECOM_PB, 126 PBAP_PHONEBOOK_TELECOM_SPD, 127 PBAP_PHONEBOOK_SIM_TELECOM_CCH, 128 PBAP_PHONEBOOK_SIM_TELECOM_ICH, 129 PBAP_PHONEBOOK_SIM_TELECOM_MCH, 130 PBAP_PHONEBOOK_SIM_TELECOM_OCH, 131 PBAP_PHONEBOOK_SIM_TELECOM_PB 132 } pbap_phonebook_t; 133 134 // lengths 135 #define PBAP_DATABASE_IDENTIFIER_LEN 16 136 #define PBAP_FOLDER_VERSION_LEN 16 137 138 139 /* API_END */ 140 141 #if defined __cplusplus 142 } 143 #endif 144 #endif 145