bluetoothengine/bteng/inc/btengprivatepskeys.h
changeset 0 f63038272f30
child 1 6a1fe72036e3
equal deleted inserted replaced
-1:000000000000 0:f63038272f30
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Bluetooth Engine private publish & subscribe key definitions.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef BTENG_PRIVATE_PS_KEYS_H
       
    20 #define BTENG_PRIVATE_PS_KEYS_H
       
    21 
       
    22 
       
    23 #include <btengdomainpskeys.h>
       
    24 #include <bttypes.h>
       
    25 
       
    26 /**  Bluetooth private category publish and subscribe UID */
       
    27 const TUid KPSUidBluetoothEnginePrivateCategory = { 0x101FFE47 };
       
    28 
       
    29 
       
    30 /**
       
    31  * Publish and Subscribe key for passing serialized BT AT Codec 
       
    32  * between HFP RemCon Bearer and Command Handler.
       
    33  *
       
    34  * Default value (in binary format): ""
       
    35  */
       
    36 const TUint KBTATCodec = 0x01;
       
    37 
       
    38 
       
    39 /**
       
    40  * Publish and Subscribe key for storing the last paired device 
       
    41  * that was denied to connect by the user.
       
    42  *
       
    43  * Default value (in string format): ""
       
    44  */
       
    45 const TUint KBTBlockDevAddr = 0x02;
       
    46 
       
    47 
       
    48 /**
       
    49 * Publish and Subscribe key for storing info of last audio device
       
    50 * that tried to connect. Used by BT notifier only
       
    51 *
       
    52 * The key will contain the following information in 8 bit descriptor
       
    53 * A;B;C
       
    54 * Where:
       
    55 * A is 0/1 depending if the last audio connection attempt was denied(0) or accepted(1)
       
    56 * B is the bt device adress as exacly 12 hex digits
       
    57 * C is the time the attempt was accepted or denied as 64 bit integer.
       
    58 
       
    59 * Example:
       
    60 * 0;0015a00f42dd;63304481516638125
       
    61 */
       
    62 
       
    63 const TUint KBTAuthorInfoPerDevice = 0x03;
       
    64 
       
    65 /**
       
    66  * Publishes outgoing pairing information for purposes of:
       
    67  *     - Ensure a single ongoing outgoing pair request in Bluetooth Engine;
       
    68  *     - BTNotif decides if auto pair with default pin shall be used or not;
       
    69  */
       
    70 const TUint KBTOutgoingPairing = 0x04;
       
    71 
       
    72 enum TBTOutgoingPairMode
       
    73     {
       
    74     /**
       
    75      * not outgoing pairing operation
       
    76      */
       
    77     EBTOutgoingPairNone = 0,
       
    78     
       
    79     /**
       
    80      * outgoing automatic 0000 pin pairing with headset in progress 
       
    81      */
       
    82     EBTOutgoingHeadsetAutoPairing,
       
    83     
       
    84     /**
       
    85      * outgoing manual pairing with headset in progress 
       
    86      */
       
    87     EBTOutgoingHeadsetManualPairing,
       
    88     
       
    89     /**
       
    90      * outgoing pairing with non-headset device in progress 
       
    91      */
       
    92     EBTOutgoingNoneHeadsetPairing,
       
    93     };
       
    94 
       
    95 class TBTOutgoingPairProperty
       
    96     {
       
    97 public:
       
    98     TBTOutgoingPairMode iMode;
       
    99     TBTDevAddr iAddr;
       
   100     };
       
   101 
       
   102 /*
       
   103 * PS Key to indicate the status of bluetooth audio link. Value is of type TBTAudioLinkInfo
       
   104 * where iState == open / closed
       
   105 *		iProfile == mono (0) or Stereo (1)
       
   106 *		iAddr == bluetooth device address
       
   107 */
       
   108 const TUint KBTAudioLinkStatus = 0x05;
       
   109 
       
   110 enum TBTAudioLinkState {
       
   111 	EAudioLinkOpen = 0,
       
   112 	EAudioLinkClosed = 1
       
   113 };
       
   114 
       
   115 class TBTAudioLinkInfo
       
   116     {
       
   117 public:    
       
   118     TBTAudioLinkState iState;
       
   119     TUint iProfile; // mono 0, stereo 1
       
   120     TBTDevAddr iAddr;
       
   121     };
       
   122 
       
   123 /**
       
   124  * Publish and Subscribe to save last connection attemmp time.
       
   125  *
       
   126  */
       
   127 const TUint KBTConnectionTimeStamp = 0x06;
       
   128 
       
   129 /**
       
   130  * Publish and Subscribe to store status for is query 
       
   131  * to turn bt off is showing or not.
       
   132  */
       
   133 const TUint KBTTurnBTOffQueryOn = 0x07;
       
   134 
       
   135 enum TBTBtQueryValue
       
   136     {
       
   137     EBTQueryOff,
       
   138     EBTQueryOn
       
   139     };
       
   140     
       
   141 /**
       
   142  * P&S to publish ongoing notifier operations with BT devices.
       
   143  * 
       
   144  * Data type: binary. 
       
   145  * 
       
   146  * Set and get the data via class TBTNotifLockPublish
       
   147  * from btnotiflock.h.
       
   148  * 
       
   149  * This info is used to lock some operations in btui and btnotifer:
       
   150  * For a heaset which was paired from phone, connecting operation
       
   151  * shall wait until trusting device has been asked from user and 
       
   152  * user selection has been performed;
       
   153  * For a device which initiated pairing with phone, query of 
       
   154  * accepting connection request from this device shall wait until
       
   155  * pairing note has been shown and trusting device has 
       
   156  * been asked from user and user selection has been performed.
       
   157  */
       
   158 const TUint KBTNotifierLocks = 0x08;
       
   159 
       
   160 #endif // BTENG_PRIVATE_PS_KEYS_H