165b58db3SMatthias Ringwald /* 265b58db3SMatthias Ringwald * Copyright (C) 2022 BlueKitchen GmbH 365b58db3SMatthias Ringwald * 465b58db3SMatthias Ringwald * Redistribution and use in source and binary forms, with or without 565b58db3SMatthias Ringwald * modification, are permitted provided that the following conditions 665b58db3SMatthias Ringwald * are met: 765b58db3SMatthias Ringwald * 865b58db3SMatthias Ringwald * 1. Redistributions of source code must retain the above copyright 965b58db3SMatthias Ringwald * notice, this list of conditions and the following disclaimer. 1065b58db3SMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright 1165b58db3SMatthias Ringwald * notice, this list of conditions and the following disclaimer in the 1265b58db3SMatthias Ringwald * documentation and/or other materials provided with the distribution. 1365b58db3SMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of 1465b58db3SMatthias Ringwald * contributors may be used to endorse or promote products derived 1565b58db3SMatthias Ringwald * from this software without specific prior written permission. 1665b58db3SMatthias Ringwald * 4. Any redistribution, use, or modification is done solely for 1765b58db3SMatthias Ringwald * personal benefit and not for any commercial purpose or for 1865b58db3SMatthias Ringwald * monetary gain. 1965b58db3SMatthias Ringwald * 2065b58db3SMatthias Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 2165b58db3SMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2265b58db3SMatthias Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 2365b58db3SMatthias Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEKITCHEN 2465b58db3SMatthias Ringwald * GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 2565b58db3SMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 2665b58db3SMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 2765b58db3SMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 2865b58db3SMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 2965b58db3SMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 3065b58db3SMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3165b58db3SMatthias Ringwald * SUCH DAMAGE. 3265b58db3SMatthias Ringwald * 3365b58db3SMatthias Ringwald * Please inquire about commercial licensing options at 3465b58db3SMatthias Ringwald * [email protected] 3565b58db3SMatthias Ringwald * 3665b58db3SMatthias Ringwald */ 3765b58db3SMatthias Ringwald 3865b58db3SMatthias Ringwald /** 3965b58db3SMatthias Ringwald * @title PBAP Client 4065b58db3SMatthias Ringwald * 4165b58db3SMatthias Ringwald */ 4265b58db3SMatthias Ringwald 4365b58db3SMatthias Ringwald #ifndef PBAP_H 4465b58db3SMatthias Ringwald #define PBAP_H 4565b58db3SMatthias Ringwald 4665b58db3SMatthias Ringwald #if defined __cplusplus 4765b58db3SMatthias Ringwald extern "C" { 4865b58db3SMatthias Ringwald #endif 4965b58db3SMatthias Ringwald 5065b58db3SMatthias Ringwald /* API_START */ 5165b58db3SMatthias Ringwald 5265b58db3SMatthias Ringwald // PBAP Supported Features 5365b58db3SMatthias Ringwald 5465b58db3SMatthias Ringwald #define PBAP_SUPPORTED_FEATURES_DOWNLOAD (1<<0) 5565b58db3SMatthias Ringwald #define PBAP_SUPPORTED_FEATURES_BROWSING (1<<1) 5665b58db3SMatthias Ringwald #define PBAP_SUPPORTED_FEATURES_DATABASE_IDENTIFIER (1<<2) 5765b58db3SMatthias Ringwald #define PBAP_SUPPORTED_FEATURES_FOLDER_VERSION_COUNTERS (1<<3) 5865b58db3SMatthias Ringwald #define PBAP_SUPPORTED_FEATURES_VCARD_SELECTING (1<<4) 5965b58db3SMatthias Ringwald #define PBAP_SUPPORTED_FEATURES_ENHANCED_MISSED_CALLS (1<<5) 6065b58db3SMatthias Ringwald #define PBAP_SUPPORTED_FEATURES_X_BT_UCI_VCARD_PROPERTY (1<<6) 6165b58db3SMatthias Ringwald #define PBAP_SUPPORTED_FEATURES_X_BT_UID_VCARD_PROPERTY (1<<7) 6265b58db3SMatthias Ringwald #define PBAP_SUPPORTED_FEATURES_CONTACT_REFERENCING (1<<8) 6365b58db3SMatthias Ringwald #define PBAP_SUPPORTED_FEATURES_DEFAULT_CONTACT_IMAGE_FORMAT (1<<9) 6465b58db3SMatthias Ringwald 6565b58db3SMatthias Ringwald // PBAP Property Mask - also used for vCardSelector 6665b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_VERSION (1<< 0) // vCard Version 6765b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_FN (1<< 1) // Formatted Name 6865b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_N (1<< 2) // Structured Presentation of Name 6965b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_PHOTO (1<< 3) // Associated Image or Photo 7065b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_BDAY (1<< 4) // Birthday 7165b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_ADR (1<< 5) // Delivery Address 7265b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_LABEL (1<< 6) // Delivery 7365b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_TEL (1<< 7) // Telephone Number 7465b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_EMAIL (1<< 8) // Electronic Mail Address 7565b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_MAILER (1<< 9) // Electronic Mail 7665b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_TZ (1<<10) // Time Zone 7765b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_GEO (1<<11) // Geographic Position 7865b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_TITLE (1<<12) // Job 7965b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_ROLE (1<<13) // Role within the Organization 8065b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_LOGO (1<<14) // Organization Logo 8165b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_AGENT (1<<15) // vCard of Person Representing 8265b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_ORG (1<<16) // Name of Organization 8365b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_NOTE (1<<17) // Comments 8465b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_REV (1<<18) // Revision 8565b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_SOUND (1<<19) // Pronunciation of Name 8665b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_URL (1<<20) // Uniform Resource Locator 8765b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_UID (1<<21) // Unique ID 8865b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_KEY (1<<22) // Public Encryption Key 8965b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_NICKNAME (1<<23) // Nickname 9065b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_CATEGORIES (1<<24) // Categories 9165b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_PROID (1<<25) // Product ID 9265b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_CLASS (1<<26) // Class information 9365b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_SORT_STRING (1<<27) // String used for sorting operations 9465b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_X_IRMC_CALL_DATETIME (1<<28) // Time stamp 9565b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_X_BT_SPEEDDIALKEY (1<<29) // Speed-dial shortcut 9665b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_X_BT_UCI (1<<30) // Uniform Caller Identifier 9765b58db3SMatthias Ringwald #define PBAP_PROPERTY_MASK_X_BT_UID (1<<31) // Bluetooth Contact Unique Identifier 9865b58db3SMatthias Ringwald 9965b58db3SMatthias Ringwald // PBAP vCardSelectorOperator 10065b58db3SMatthias Ringwald #define PBAP_VCARD_SELECTOR_OPERATOR_OR 0 10165b58db3SMatthias Ringwald #define PBAP_VCARD_SELECTOR_OPERATOR_AND 1 10265b58db3SMatthias Ringwald 103f03c85deSMatthias Ringwald // PBAP Format 104f03c85deSMatthias Ringwald typedef enum { 105f03c85deSMatthias Ringwald PBAP_FORMAT_VCARD_21 = 0, 106f03c85deSMatthias Ringwald PBAP_FORMAT_VCRAD_30 107f03c85deSMatthias Ringwald } pbap_format_vcard_t; 108f03c85deSMatthias Ringwald 109*f88bff64SMatthias Ringwald // PBAP Object Types 11060298ca9SMatthias Ringwald typedef enum { 11160298ca9SMatthias Ringwald PBAP_OBJECT_TYPE_INVALID = 0, 11260298ca9SMatthias Ringwald PBAP_OBJECT_TYPE_PHONEBOOOK, 11360298ca9SMatthias Ringwald PBAP_OBJECT_TYPE_VCARD_LISTING, 11460298ca9SMatthias Ringwald PBAP_OBJECT_TYPE_VCARD, 11560298ca9SMatthias Ringwald } pbap_object_type_t; 11660298ca9SMatthias Ringwald 117*f88bff64SMatthias Ringwald // PBAP Phonebooks 118*f88bff64SMatthias Ringwald typedef enum { 119*f88bff64SMatthias Ringwald PBAP_PHONEBOOK_INVALID = 0, 120*f88bff64SMatthias Ringwald PBAP_PHONEBOOK_TELECOM_CCH, 121*f88bff64SMatthias Ringwald PBAP_PHONEBOOK_TELECOM_FAV, 122*f88bff64SMatthias Ringwald PBAP_PHONEBOOK_TELECOM_ICH, 123*f88bff64SMatthias Ringwald PBAP_PHONEBOOK_TELECOM_MCH, 124*f88bff64SMatthias Ringwald PBAP_PHONEBOOK_TELECOM_OCH, 125*f88bff64SMatthias Ringwald PBAP_PHONEBOOK_TELECOM_PB, 126*f88bff64SMatthias Ringwald PBAP_PHONEBOOK_TELECOM_SPD, 127*f88bff64SMatthias Ringwald PBAP_PHONEBOOK_SIM_TELECOM_CCH, 128*f88bff64SMatthias Ringwald PBAP_PHONEBOOK_SIM_TELECOM_ICH, 129*f88bff64SMatthias Ringwald PBAP_PHONEBOOK_SIM_TELECOM_MCH, 130*f88bff64SMatthias Ringwald PBAP_PHONEBOOK_SIM_TELECOM_OCH, 131*f88bff64SMatthias Ringwald PBAP_PHONEBOOK_SIM_TELECOM_PB 132*f88bff64SMatthias Ringwald } pbap_phonebook_t; 133*f88bff64SMatthias Ringwald 134ecc39c37SMatthias Ringwald // lengths 135ecc39c37SMatthias Ringwald #define PBAP_DATABASE_IDENTIFIER_LEN 16 136ecc39c37SMatthias Ringwald #define PBAP_FOLDER_VERSION_LEN 16 137ecc39c37SMatthias Ringwald 138ecc39c37SMatthias Ringwald 13965b58db3SMatthias Ringwald /* API_END */ 14065b58db3SMatthias Ringwald 14165b58db3SMatthias Ringwald #if defined __cplusplus 14265b58db3SMatthias Ringwald } 14365b58db3SMatthias Ringwald #endif 14465b58db3SMatthias Ringwald #endif 145