bluetoothengine/btnotif/inc/BTNGenericQueryNotifier.h
changeset 19 43824b19ee35
parent 17 f05641c183ff
child 33 837dcc42fd6a
equal deleted inserted replaced
17:f05641c183ff 19:43824b19ee35
     1 /*
       
     2 * Copyright (c) 2002 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:  Declares Generic Query Notifier Class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef BTNGENERICQUERYNOTIFIER_H
       
    20 #define BTNGENERICQUERYNOTIFIER_H
       
    21 
       
    22 // INCLUDES
       
    23 
       
    24 #include "btnotifier.h" // Base class
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 
       
    28 // CLASS DECLARATION
       
    29 NONSHARABLE_CLASS(CBTGenericQueryNotifier) : public CBTNotifierBase
       
    30     {
       
    31     public: // Constructors and destructor
       
    32 
       
    33         /**
       
    34         * Two-phased constructor.
       
    35         */
       
    36         static CBTGenericQueryNotifier* NewL();
       
    37 
       
    38         /**
       
    39         * Destructor.
       
    40         */
       
    41         virtual ~CBTGenericQueryNotifier();
       
    42 
       
    43     private: // Functions from base classes
       
    44 
       
    45         /**
       
    46         * From CBTNotifierBase Called when a notifier is first loaded 
       
    47         * to allow any initial construction that is required.
       
    48         * @param None.
       
    49         * @return A structure containing priority and channel info.
       
    50         */
       
    51         TNotifierInfo RegisterL();
       
    52        
       
    53         /** From CBTNotifierBase Synchronic notifier launch.        
       
    54         * @param aBuffer Received parameter data.
       
    55         * @return A pointer to return value.
       
    56         */
       
    57         TPtrC8 StartL(const TDesC8& aBuffer );
       
    58                 
       
    59         /**
       
    60         * From CBTNotifierBase Used in asynchronous notifier launch to 
       
    61         * store received parameters into members variables and 
       
    62         * make needed initializations.
       
    63         * @param aBuffer A buffer containing received parameters
       
    64         * @param aReturnVal The return value to be passed back.
       
    65         * @param aMessage Should be completed when the notifier is deactivated.
       
    66         * @return None.
       
    67         */
       
    68         void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
       
    69 
       
    70 		/**
       
    71         * From CBTNotifierBase Updates a currently active notifier.
       
    72         * @param aBuffer The updated data.
       
    73         * @return A pointer to return value.
       
    74         */
       
    75         TPtrC8 UpdateL(const TDesC8& aBuffer);
       
    76         
       
    77     private:
       
    78 
       
    79 		/**
       
    80         * Parse the data out of the message that is sent by the client of the notifier. 
       
    81 		* @param aBuffer A package buffer containing received parameters.
       
    82         * @return None.
       
    83         */
       
    84 		void ProcessParamBufferL(const TDesC8& aBuffer);
       
    85 		
       
    86         /**
       
    87         * C++ default constructor.
       
    88         */
       
    89         CBTGenericQueryNotifier();   
       
    90         
       
    91         /**
       
    92          * Show query and complete message.
       
    93          */
       
    94         void ShowQueryAndCompleteL();
       
    95                 
       
    96     private:
       
    97     	
       
    98         RBuf				iQueryMessage;
       
    99 		HBufC*				iQueryHeader;
       
   100         HBufC*				iName;
       
   101 
       
   102 	    TInt 		iMessageResourceId;
       
   103 	    TSecondaryDisplayBTnotifDialogs	iSecondaryDisplayCommand;
       
   104 		TBool 		iIsMessageQuery;
       
   105 		TBool 		iIsNameQuery;
       
   106     };
       
   107 
       
   108 #endif
       
   109 
       
   110 // End of File