omaprovisioning/provisioning/ProvisioningSC/Inc/CWPBioMsgHandler.h
changeset 0 b497e44ab2fc
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     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:  Stores provisioning messages into inbox
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CWPBIOMSGHANDLER_H
       
    21 #define CWPBIOMSGHANDLER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include	<e32base.h>
       
    25 #include	<msvapi.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CClientMtmRegistry;
       
    29 class CPushMessage;
       
    30 class CWPPushMessage;
       
    31 
       
    32 /**
       
    33 *  CWPBioMsgHandler manages the storage of the imsi numbers
       
    34 *  of processed SIM cards.
       
    35 *  @since 2.5
       
    36 */
       
    37 class CWPBioMsgHandler : public CBase, public MMsvSessionObserver
       
    38     {
       
    39     public:  // Constructors and destructor
       
    40         
       
    41         /**
       
    42         * Two-phased constructor.
       
    43         */
       
    44         static CWPBioMsgHandler* NewL();
       
    45 
       
    46 		/**
       
    47         * Two-phased constructor.
       
    48         */
       
    49         static CWPBioMsgHandler* NewLC();
       
    50         
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CWPBioMsgHandler();
       
    55 
       
    56 	public: // from MMsvSessionObserver
       
    57 		void HandleSessionEventL( TMsvSessionEvent aEvent, TAny* aArg1,
       
    58 								TAny* aArg2, TAny* aArg3);
       
    59 
       
    60     public: // New functions
       
    61 
       
    62 
       
    63 		/**
       
    64         * Creates an intermediary message for storing settings
       
    65 		* @param provisioning document containing message body
       
    66 		* @return the message
       
    67 		* @since 2.6
       
    68         */
       
    69 		CWPPushMessage* CreateMessageLC( TDesC8& aProvisioningDoc );
       
    70         
       
    71 		/**
       
    72         * Stores SIM smart card provisioned settings
       
    73 		* into Inbox
       
    74         * @param the intermediary message to be stored
       
    75 		* @since 2.6
       
    76         */
       
    77 		void StoreMessageL( CWPPushMessage& aMessage );
       
    78 
       
    79 		/**
       
    80         * Stores an information note into Inbox
       
    81         * @param a resource id
       
    82 		* @param the intermediary message
       
    83 		* @since 2.6
       
    84         */
       
    85 		void StoreMessageL( TInt aResource, CWPPushMessage& aMessage );
       
    86 
       
    87 
       
    88     private:
       
    89 
       
    90         /**
       
    91         * C++ default constructor.
       
    92         */
       
    93         CWPBioMsgHandler();
       
    94 
       
    95         /**
       
    96         * By default Symbian 2nd phase constructor is private.
       
    97         */
       
    98         void ConstructL();
       
    99 
       
   100         /**
       
   101         * Creates CPushmessage
       
   102 		* @param provisioning wbxml document for message body
       
   103 		* @return message with a new header and given body
       
   104         */
       
   105 		CPushMessage* CreatePushMessageL( TDesC8& aProvisioningDoc );
       
   106 
       
   107 
       
   108 		/**
       
   109         * Sets entry parameters
       
   110 		* @param entry to be set
       
   111         */
       
   112 		void PrepareEntryL( TMsvEntry& aEntry );
       
   113 
       
   114 		/**
       
   115         * Stores a given entry into inbox
       
   116 		* @param push message to be stored
       
   117 		* @param entry to be stored
       
   118         */
       
   119 		void StoreEntryL( CWPPushMessage& aPushMsg, TMsvEntry& aEntry );
       
   120 
       
   121 		/**
       
   122         * Sets the biouid member from message's bio type.
       
   123         * @param aMessage The message whose content type to look
       
   124         */
       
   125         void BioMessageTypeL( CPushMessage& aMessage );
       
   126 
       
   127     private:    // Data
       
   128 
       
   129 	// client session on the message server
       
   130     CMsvSession*	iSession; // owned
       
   131 	// Message Type Module
       
   132     CBaseMtm*		iMtm; // owned
       
   133 	// Mtm client registry for creating new mtms  
       
   134     CClientMtmRegistry* iMtmRegistry; // owned
       
   135 	/// Push message header and contents. 
       
   136 	CWPPushMessage* iMessage; // owned
       
   137 	TUid iBioUid;
       
   138     };
       
   139 
       
   140 #endif      // CWPBioMsgHandler_H   
       
   141 // End of File