mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcetransactiondatacontainer.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     1 /*
       
     2 * Copyright (c) 2005 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 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef TMceTRANSACTIONDATACONTAINER_H
       
    20 #define TMceTRANSACTIONDATACONTAINER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <badesca.h>
       
    25 //#include <mcedefs.h>
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30 * Container class to hold detailed data of a transaction.
       
    31 *
       
    32 * It is assumed, that user has only one instance of this class.
       
    33 * The same instance is passed between MCE and user, but the data
       
    34 * inside of this container is just updated for each event.
       
    35 *
       
    36 * The data inside the container is valid only during the execution
       
    37 * of the callback function. After this the remaining data in container
       
    38 * is deleted.
       
    39 *
       
    40 * @lib mceclient.lib
       
    41 */
       
    42 class TMceTransactionDataContainer
       
    43     {
       
    44     public:
       
    45      
       
    46 		/**
       
    47 		* Default constructor
       
    48 		*/
       
    49      	IMPORT_C TMceTransactionDataContainer();
       
    50      	
       
    51 		/**
       
    52 		* Returns status code
       
    53 		* @returns status code of transaction, if any.
       
    54 		*/
       
    55      	IMPORT_C TInt GetStatusCode();
       
    56      	
       
    57 		/**
       
    58 		* Returns reason phrase, ownership is transferred.
       
    59 		* @returns reason phrase of transaction, if any.
       
    60 		*/
       
    61      	IMPORT_C HBufC8* GetReasonPhrase();
       
    62      	
       
    63 		/**
       
    64 		* Returns headers, ownership is transferred.
       
    65 		* @returns headers of transaction, if any.
       
    66 		*/
       
    67      	IMPORT_C CDesC8Array* GetHeaders();
       
    68      	
       
    69 		/**
       
    70 		* Returns content type, ownership is transferred.
       
    71 		* @returns content type of transaction, if any.
       
    72 		*/
       
    73      	IMPORT_C HBufC8* GetContentType();
       
    74      	
       
    75 		/**
       
    76 		* Returns content headers, ownership is transferred.
       
    77 		* @returns headers of content, if any.
       
    78 		*/
       
    79      	IMPORT_C CDesC8Array* GetContentHeaders();
       
    80      	
       
    81 		/**
       
    82 		* Returns content, ownership is transferred.
       
    83 		* @returns content of transaction, if any.
       
    84 		*/
       
    85      	IMPORT_C HBufC8* GetContent();
       
    86      	
       
    87     public: // IMPORTED FOR STUBBING PURPOSES, NORMALLY NOT IMPORTED
       
    88      
       
    89      	IMPORT_C void SetStatusCode( TInt aStatusCode );
       
    90      	
       
    91      	IMPORT_C void SetReasonPhrase( HBufC8* aReasonPhrase );
       
    92      	
       
    93      	IMPORT_C void SetHeaders( CDesC8Array* aHeaders );
       
    94      	
       
    95      	IMPORT_C void SetContentType( HBufC8* aContentType );
       
    96      	
       
    97         IMPORT_C void SetContent( HBufC8* aContent );
       
    98      	
       
    99      	IMPORT_C void SetContentHeaders( CDesC8Array* aHeaders );
       
   100      	
       
   101      	IMPORT_C void Clear();
       
   102      	
       
   103     private:
       
   104     
       
   105 		TUint32 iStatusCode;
       
   106 		
       
   107 		HBufC8* iReasonPhrase;
       
   108 		
       
   109 		CDesC8Array* iHeaders;
       
   110 		
       
   111         HBufC8* iContentType;
       
   112         
       
   113 		CDesC8Array* iContentHeaders;
       
   114 		
       
   115 		HBufC8* iContent;
       
   116 		
       
   117 	
       
   118     };
       
   119 
       
   120 #endif