deviceupdatesui/cpqtsp/inc/CWPBioControl.h
branchGCC_SURGE
changeset 48 751cd8585b82
parent 28 7d88c1eb7da3
parent 42 aa33c2cb9a50
child 50 b7aa21d67399
equal deleted inserted replaced
28:7d88c1eb7da3 48:751cd8585b82
     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: 
       
    15 *     Bio control for Provisioning documents.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CWPBIOCONTROL_H
       
    21 #define CWPBIOCONTROL_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32cmn.h>
       
    25 #include <msvapi.h>
       
    26 #include "CWPBootstrap.h"
       
    27 
       
    28 class CWPEngine;
       
    29 class CWPNameValue;
       
    30 class CWPPushMessage;
       
    31 class CWPBootstarp;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36  * Bio control for OMA Provisioning messages.
       
    37  * @since 2.0
       
    38  */
       
    39  
       
    40  class CDummyObserver : public CBase, public MMsvSessionObserver
       
    41 {
       
    42 public:
       
    43         void HandleSessionEventL(TMsvSessionEvent, TAny*, TAny*, TAny*) {};
       
    44 };
       
    45 
       
    46 
       
    47 class CWPBioControl//: public CMsgBioControl
       
    48     {
       
    49     public:  // Constructor and destructor
       
    50 
       
    51         /**
       
    52         * Two-phased constructor.
       
    53         * @param aObserver Reference to the Bio control observer.
       
    54         * @param aSession Reference to Message Server session.
       
    55         * @param aId Id of the message.
       
    56         * @param aEditorOrViewerMode Enum for the mode, is it as editor or viewer.
       
    57         * @param aFileName The newly created object.
       
    58         * @param aFile file handle to provisioning content.
       
    59         */
       
    60         IMPORT_C static CWPBioControl* NewL( CMsvSession* aSession,TMsvId aId);
       
    61        ~CWPBioControl();
       
    62         RPointerArray<CWPNameValue>* CollectItemsLC() const;        
       
    63 	    CWPEngine* returnEngine();	       
       
    64 	    
       
    65     private: // Constructors
       
    66 
       
    67         /**
       
    68         * Constructor is prohibited.
       
    69         * @param aObserver Reference to the Bio control observer.
       
    70         * @param aSession Reference to Message Server session.
       
    71         * @param aId Id of the message in Message Server.
       
    72         * @param aEditorOrViewerMode Enum for the mode, is it as editor or viewer.
       
    73         * @param aFileName The newly created object.
       
    74         * @param aFile file handle to provisioning content.
       
    75         */
       
    76         CWPBioControl( CMsvSession* aSession,TMsvId aId);
       
    77         void ConstructL(CMsvSession* aSession,TMsvId aId);
       
    78 	
       
    79     private: 
       
    80         
       
    81         void AddItemsL();
       
    82         void CollateAndAddItemsL( RPointerArray<CWPNameValue>& aItems );        
       
    83         void DoSaveL();
       
    84         void AuthenticateL( CWPPushMessage& aMessage );
       
    85         void RestoreMsgL();
       
    86         static TInt Compare( const CWPNameValue& aImpl1,const CWPNameValue& aImpl2 );
       
    87         void SaveSettingsL();
       
    88         void SetCenrepKeyL(const TDesC8& aValue);
       
    89         void SaveMessageL();
       
    90         static void Cleanup( TAny* aAny );
       
    91         
       
    92     private: 
       
    93         CWPEngine*      iEngine;
       
    94         CWPPushMessage* iMessage;
       
    95         CDummyObserver* iObserver;
       
    96         CMsvSession* iSession;
       
    97         TMsvId iId;   
       
    98         TMsvEntry iEntry;
       
    99     };
       
   100 
       
   101 
       
   102 
       
   103 #endif // CWPBIOCONTROL_H
       
   104 
       
   105 // End of File