imservices/ossprotocoladaptation/inc/im/cosssendmessagerequest.h
branchRCL_3
changeset 14 7797b2f86d2b
parent 13 b6f2a363adf7
child 16 cfe5eb8bb9ca
equal deleted inserted replaced
13:b6f2a363adf7 14:7797b2f86d2b
     1 /*
       
     2 * Copyright (c) 2007-2008 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:  Oss Protocol send massage request
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __COSSSENDMESSAGEREQUEST_H__
       
    20 #define __COSSSENDMESSAGEREQUEST_H__
       
    21 
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <ximpbase.h>
       
    26 #include "ossprotocolpluginlogger.h"
       
    27 #include "ossprotocloliterals.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 
       
    31 class MOSSProtocolConnectionManager;
       
    32 
       
    33 class MImConversationInfo;
       
    34 /**
       
    35  * COSSSendMessageRequest
       
    36  *
       
    37  * Issue Send Message Request to Network Server
       
    38  *
       
    39  */
       
    40 
       
    41 class COSSSendMessageRequest: public CActive
       
    42 
       
    43 
       
    44 	{
       
    45 
       
    46 	public:
       
    47 
       
    48 		static COSSSendMessageRequest* NewL (
       
    49 		    MOSSProtocolConnectionManager& aConnMan,
       
    50 		    TXIMPRequestId aRequestId );
       
    51 
       
    52 		static COSSSendMessageRequest* NewLC (
       
    53 		    MOSSProtocolConnectionManager& aConnMan,
       
    54 		    TXIMPRequestId aRequestId );
       
    55 
       
    56 		virtual ~COSSSendMessageRequest();
       
    57 
       
    58 	private:
       
    59 
       
    60 		COSSSendMessageRequest (
       
    61 		    MOSSProtocolConnectionManager& aConnMan,
       
    62 		    TXIMPRequestId aRequestId  );
       
    63 		void ConstructL();
       
    64 
       
    65 	private: // from CActive
       
    66 
       
    67 		void DoCancel();
       
    68 		/*
       
    69 		 * RunL() function also deletes the request object once the activity is done
       
    70 		 *
       
    71 		 */
       
    72 		void RunL();
       
    73 		TInt RunError ( TInt aError );
       
    74 
       
    75 	public:
       
    76 		/**
       
    77 		  * Send message to the recipients
       
    78 		  * @param aImMessage stucture stores message,recipients
       
    79 		*/
       
    80 		void SendMessageL ( const MImConversationInfo& aImMessage );
       
    81 
       
    82 	private: // data
       
    83 
       
    84 		/**
       
    85 		 * Request Id from ximpfw
       
    86 		 */
       
    87 		TXIMPRequestId iRequestId;
       
    88 		/**
       
    89 		 * Send data request to pure data handler generates the id
       
    90 		 */
       
    91 		TInt iSendId;
       
    92 	    /**
       
    93 		 * list id
       
    94 		 * Own
       
    95 		 */
       
    96 		HBufC16* iListId;
       
    97 		/**
       
    98 		 * Oss Protocol Plugin Connection Manager
       
    99 		 * Not own.  *** Write "Not own" if some other class owns this object.
       
   100 		 */
       
   101 		MOSSProtocolConnectionManager& iConnMan;
       
   102 
       
   103 	};
       
   104 
       
   105 
       
   106 #endif // __COSSSENDMESSAGEREQUEST_H__
       
   107