bluetoothengine/bteng/btengconnman/inc/btengconnhandler.h
branchRCL_3
changeset 56 9386f31cc85b
parent 55 613943a21004
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
   144      * ?description
   144      * ?description
   145      *
   145      *
   146      * @since S60 v3.2
   146      * @since S60 v3.2
   147      * @return ?description
   147      * @return ?description
   148      */
   148      */
   149     void CancelNotifyConnectionEvents();
   149     TInt CancelNotifyConnectionEvents();
       
   150 
       
   151     /**
       
   152      * Set a pairing observer in BTEngine.
       
   153      *
       
   154      * @since S60 v3.2
       
   155      * @param aAddr The address of the remote device that is being paired.
       
   156      * @param aActivate If ETrue, the observer will be activated, otherwise
       
   157      *                  the observer will be removed.
       
   158      * @return KErrNone on success, otherwise a system-wide error code.
       
   159      */
       
   160     static TInt SetPairingObserver( const TBTDevAddr& aAddr, TBool aActivate );
   150 
   161 
   151     /**
   162     /**
   152      * ?description
   163      * ?description
   153      *
   164      *
   154      * @since S60 v3.2
   165      * @since S60 v3.2
   155      * @return ?description
   166      * @return ?description
   156      */
   167      */
   157     inline TInt PrepareDiscovery();
   168     inline TInt PrepareDiscovery();
       
   169 
       
   170 
       
   171     /**
       
   172      * Pair a device
       
   173      *
       
   174      * @since S60 v5.1
       
   175      * @param aAddr the address of the device to pair with
       
   176      * @param aDeviceClass the device class of the device to pair with
       
   177      * @return KErrNone if this request has been accepted; an error situation otherwise.
       
   178      */
       
   179     TInt StartPairing( const TBTDevAddr& aAddr, const TBTDeviceClass& aDeviceClass );
       
   180 
       
   181     /**
       
   182      * cancel the outstanding pairing request.
       
   183      */
       
   184     void CancelPairing();
   158     
   185     
   159 private:
   186 private:
   160 // from base class MBTEngActiveObserver
   187 // from base class MBTEngActiveObserver
   161 
   188 
   162     /**
   189     /**
   163      * From MBTEngActiveObserver.
   190      * From MBTEngActiveObserver.
   164      * Handles the notification of a change in the connection status.
   191      * Handles the notification of a change in the connection status.
   165      *
   192      *
   166      * @since S60 v3.2
   193      * @since S60 v3.2
   167      */
   194      */
   168     virtual void RequestCompletedL( CBTEngActive* aActive, TInt aStatus );
   195     virtual void RequestCompletedL( CBTEngActive* aActive, TInt aId, TInt aStatus );
   169 
   196 
   170     /**
       
   171      * Callback for handling cancelation of an outstanding request.
       
   172      *
       
   173      * @param aId The ID that identifies the outstanding request.
       
   174      */
       
   175     virtual void CancelRequest( TInt aRequestId );
       
   176     
       
   177     /**
   197     /**
   178      * From MBTEngActiveObserver.
   198      * From MBTEngActiveObserver.
   179      * Handles an error during processing of connection status event.
   199      * Handles an error during processing of connection status event.
   180      *
   200      *
   181      * @since S60 v3.2
   201      * @since S60 v3.2
   182      */
   202      */
   183     virtual void HandleError( CBTEngActive* aActive, TInt aError );
   203     virtual void HandleError( CBTEngActive* aActive, TInt aId, TInt aError );
   184 
   204 
   185 private:
   205 private:
   186 
   206 
   187     /**
   207     /**
   188      * C++ default constructor
   208      * C++ default constructor
   200 
   220 
   201     /**
   221     /**
   202      * Client-server package to which the event result is copied.
   222      * Client-server package to which the event result is copied.
   203      */
   223      */
   204     TBTEngEventPkg iEventPkg;
   224     TBTEngEventPkg iEventPkg;
       
   225 
       
   226     /**
       
   227      * Address of the remote device to pair with.
       
   228      */
       
   229     TBTDevAddrPckgBuf iPairAddr;
       
   230     
       
   231     /**
       
   232      * The CoD of the remote device to pair with.
       
   233      */
       
   234     TUint32 iPairDevCod;
   205     
   235     
   206     /**
   236     /**
   207      * Session with BTEng server side.
   237      * Session with BTEng server side.
   208      */
   238      */
   209     RBTEng iBTEng;
   239     RBTEng iBTEng;
   211     /**
   241     /**
   212      * The actual active object for receiving event notifications.
   242      * The actual active object for receiving event notifications.
   213      * Own.
   243      * Own.
   214      */
   244      */
   215     CBTEngActive* iConnEventActive;
   245     CBTEngActive* iConnEventActive;
       
   246 
       
   247     /**
       
   248      * The actual active object for pairing a device.
       
   249      * Own.
       
   250      */
       
   251     CBTEngActive* iPairActive;
   216     
   252     
   217     /**
   253     /**
   218      * Reference to receiver of connection events.
   254      * Reference to receiver of connection events.
   219      * Not own.
   255      * Not own.
   220      */
   256      */