imstutils/imconversationview/tsrc/imcvuiengine_test/inc/imcvuiengine_testsendmessage.h
branchRCL_3
changeset 28 3104fc151679
parent 27 2b7283837edb
child 29 9a48e301e94b
equal deleted inserted replaced
27:2b7283837edb 28:3104fc151679
     1 /*
       
     2 * Copyright (c) 2002 - 2007 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:  imcvuiengine_test test module.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _IMCVENGINESENDMESSAGE_H_
       
    20 #define _IMCVENGINESENDMESSAGE_H_
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include <e32math.h>
       
    24 #include <e32base.h>
       
    25 #include "cimcvengine.h"
       
    26 #include "mimcvenginemessagehandlerobserver.h"
       
    27 
       
    28 class MIMCVEngineFactory;
       
    29 
       
    30 class CSPSettings;
       
    31 
       
    32 NONSHARABLE_CLASS(CIMCVUiEngine_TestSendMessage) : public CBase,
       
    33                                                    public MIMCVEngineMessageHandlerObserver
       
    34 									   
       
    35     { 
       
    36     public:  // Constructors and destructor
       
    37 
       
    38 
       
    39         /**
       
    40         * Two-phased constructor.
       
    41         */
       
    42         static CIMCVUiEngine_TestSendMessage* NewL();
       
    43 
       
    44         /**
       
    45         * Destructor.
       
    46         */
       
    47         virtual ~CIMCVUiEngine_TestSendMessage();
       
    48         
       
    49         void CreateConnectionL();
       
    50         
       
    51         void ReleaseConnectionL();
       
    52 
       
    53     public: // MImCommandObserver
       
    54     
       
    55     	
       
    56         /**
       
    57         * StartNewConvesationL test method.
       
    58         * @return Symbian OS error code.
       
    59         */
       
    60         TInt StartNewConvesationL();
       
    61         
       
    62          /**
       
    63         * CloseConvesationL test method.
       
    64         * @return Symbian OS error code.
       
    65         */
       
    66         TInt CloseConvesationL();
       
    67         
       
    68         
       
    69         /**
       
    70         * SendNullMessageL test method.
       
    71         * @return Symbian OS error code.
       
    72         */
       
    73         TInt SendNullMessageL();
       
    74         
       
    75          /**
       
    76         * SendTextMessageL test method.
       
    77         * @return Symbian OS error code.
       
    78         */
       
    79         TInt SendTextMessageL();
       
    80 
       
    81         /**
       
    82         * SendSplCharMessageL test method.
       
    83         * @return Symbian OS error code.
       
    84         */
       
    85         TInt SendSplCharMessageL();
       
    86         
       
    87          /**
       
    88         * SendCosMessageL test method.
       
    89         * @return Symbian OS error code.
       
    90         */
       
    91         TInt SendCosMessageL();
       
    92         
       
    93         /**
       
    94         * DeactivateConvesationL test method.
       
    95         * @return Symbian OS error code.
       
    96         */
       
    97         TInt DeactivateConvesationL();
       
    98         
       
    99          /**
       
   100         * SendToInvaliedRecipientL test method.
       
   101         * @return Symbian OS error code.
       
   102         */
       
   103         TInt SendToInvaliedRecipientL();
       
   104         
       
   105         /**
       
   106         * TestRecievedMessageL test method.
       
   107         * @return Symbian OS error code.
       
   108         */
       
   109         TInt TestMultipleSendMessageL( );
       
   110         
       
   111          /**
       
   112         * TestSplCharRecieveMsgL test method.
       
   113         * @return Symbian OS error code.
       
   114         */
       
   115         TInt TestSendRecieveMsgL();
       
   116 
       
   117         /**
       
   118         * TestCosRecieveMsgL test method.
       
   119         */
       
   120         TInt TestSendFetchSendMsgL();
       
   121         
       
   122         TInt TestConnectionTerminationL();    
       
   123         
       
   124         TInt TestLoginStateL();
       
   125         
       
   126         TInt TestLoginUserIdL();
       
   127         
       
   128         TInt TestGetLanguageIdL();
       
   129         
       
   130         TInt TestGetBrandIdL();
       
   131         
       
   132         TInt TestChatInterfaceL();
       
   133             	
       
   134 		TInt GetResult() const ;
       
   135 		
       
   136 		TInt TestMessageCoundL();
       
   137 		
       
   138 		TInt TestMessageUnreadCoundL();
       
   139 		
       
   140 		TInt TestSubscribePresenceL();
       
   141 		
       
   142 		TInt TestGetPresenceStatusL();
       
   143 		
       
   144 		TInt TestAppendInfoMessageL();
       
   145 		
       
   146 		
       
   147 		TInt DeleteContextL();
       
   148 		
       
   149 		TInt CreateContextL();
       
   150 		
       
   151 		TInt TestCCHHandlerL();
       
   152 
       
   153 
       
   154 		TInt ReadyForShutdownTestL();
       
   155 		TInt ServiceNameTestL();
       
   156 		TInt OpenChatsTestL();
       
   157 		TInt GetServiceIdTestL();
       
   158 		
       
   159 		TInt TestClosAllContainerL();
       
   160 		TInt TestDeleteChatL();
       
   161 		TInt TestEditorMessageL();
       
   162 		
       
   163 		TInt TestConvertPresCacheEnum();
       
   164 
       
   165 			
       
   166 	public :
       
   167 		
       
   168 	    /**
       
   169 	     * @see handle the presence change notification
       
   170 	     * to handle the connection lost
       
   171 	     */
       
   172 	    void HandlePresenceChangedL(TInt aServiceId, const TDesC& aBuddyId ) ;
       
   173 
       
   174 	    /**
       
   175 	     * Handle message send operation completion.
       
   176 	     * @param aResult result  to handle.
       
   177 	     */
       
   178 	    void HandleOperationCompletdL(TInt aserviceId, MIMCVEngineMessage::TMessagerType aType , TInt aResult)  ;
       
   179 
       
   180 	    /**
       
   181 	     * @see HandleConnectionTerminatedL
       
   182 	     * to handle the connection lost
       
   183 	     * @param aReason, reason report
       
   184 	     */
       
   185 	    void HandleConnectionEventL(TInt aServiceId, TIMCVConnectionState aState, TInt aReason )    ;
       
   186 		
       
   187    	
       
   188     private:
       
   189 
       
   190         /**
       
   191         * C++ default constructor.
       
   192         */
       
   193         CIMCVUiEngine_TestSendMessage();
       
   194 
       
   195         /**
       
   196         * By default Symbian 2nd phase constructor is private.
       
   197         */
       
   198         void ConstructL();
       
   199         
       
   200         /**
       
   201         * read the service id
       
   202         */
       
   203         void ReadServiceDetalsL();
       
   204         
       
   205 
       
   206     private:   
       
   207     
       
   208         //OWN: Active scheduler wait for waiting the completion
       
   209         MIMCVEngineFactory* iEngineFactory;
       
   210         
       
   211         //not owns
       
   212     	CIMCVEngine* iEngine ;
       
   213     		
       
   214     	CActiveSchedulerWait iWait;
       
   215     	
       
   216 		TInt iResult;
       
   217 		
       
   218 		TInt iServiceId;
       
   219 		
       
   220 			//owns : reference to setting
       
   221         CSPSettings* iSettings;
       
   222     };
       
   223 
       
   224 #endif      // _IMCVENGINESENDMESSAGE_H_
       
   225 
       
   226 // End of File