IMPSengine/client/inc/impsimcommand.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2002-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: Header file for im commander
       
    15 * 
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef ImpsImCommand_H
       
    21 #define ImpsImCommand_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include "impsconst.h"
       
    26 #include "impsservercommon.h"
       
    27 #include "impsdataaccessorapi.h"
       
    28 #include "impsclientsrv.h"
       
    29 
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class CImpsKey;
       
    33 
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 class CImpsImCommand2 :public CActive
       
    38     {
       
    39     public:  // Constructors and destructor
       
    40         
       
    41         /**
       
    42         * Two-phased constructor.
       
    43         * @param aClient a client session
       
    44         */
       
    45         static CImpsImCommand2* NewL( RImpsImClient2& aClient );
       
    46         
       
    47         /**
       
    48         * Destructor.
       
    49         */
       
    50         virtual ~CImpsImCommand2();
       
    51 
       
    52     public: // New functions
       
    53         
       
    54         /** 
       
    55         * Start the execution. 
       
    56         * @param aOpId operation-id
       
    57         * @param aType message type
       
    58         * @param aMessage message
       
    59         */
       
    60         void StartRunL( 
       
    61             TInt                aOpId,
       
    62             TImpsServRequest    aType );
       
    63 
       
    64         /**
       
    65         * Set request parameters.
       
    66         */
       
    67         void SetParametersL( 
       
    68             const TDesC* aSenderSn,
       
    69             //const TDesC* aSendeGroup,
       
    70             const MDesCArray* aUserIds,
       
    71             const TDesC* aGroupId,         
       
    72             const MDesCArray* aScreenNames, 
       
    73             const TDesC& aContent,
       
    74             TBool aDeliveryReportWanted );
       
    75 
       
    76         /**
       
    77         * Set request parameters.
       
    78         */
       
    79         void SetParametersL( 
       
    80             const TDesC* aSenderSn,
       
    81             const MDesCArray* aUserIds,
       
    82             const TDesC* aGroupId,         
       
    83             const MDesCArray* aScreenNames, 
       
    84             const TDesC& aContentType,
       
    85             const TDesC8& aContent,
       
    86             TBool aDeliveryReportWanted );
       
    87 
       
    88 
       
    89         /*
       
    90         * Set request parameyter for blocking
       
    91         */
       
    92         void SetParametersL(
       
    93             const MDesCArray* aBlockEntity,
       
    94             const MDesCArray* aUnBlockEntity,
       
    95             TBool aBlockedListInUse,
       
    96             const MDesCArray* aGrantedEntityList,
       
    97             const MDesCArray* aUnGrantEntity,
       
    98             TBool aGrantedListInUse );
       
    99 
       
   100 
       
   101     private:
       
   102 
       
   103         /**
       
   104         * C++ default constructor.
       
   105         */
       
   106         CImpsImCommand2( TInt aPriority, RImpsImClient2& aClient );
       
   107 
       
   108 
       
   109         // from CActive
       
   110         void RunL();
       
   111         void DoCancel();
       
   112 
       
   113         /**
       
   114         * By default constructor is private.
       
   115         */
       
   116         void ConstructL();
       
   117 
       
   118         // By default, prohibit copy constructor
       
   119         CImpsImCommand2( const CImpsImCommand2& );
       
   120         // Prohibit assigment operator
       
   121         CImpsImCommand2& operator= ( const CImpsImCommand2& );
       
   122 
       
   123     private:    // Data
       
   124         RImpsImClient2&  iClient;
       
   125         TInt                iOpId;
       
   126         TImpsServRequest    iType;
       
   127         TInt                iState;
       
   128 
       
   129         // Local copies of data to enable internally asyncronous request
       
   130         HBufC8*     iMessageStream;    // streaming buffer for packed messages
       
   131 
       
   132         CImpsDetailed* iDetailed; 
       
   133 
       
   134     private:    // Friend classes
       
   135         friend class RImpsImClient2;
       
   136 
       
   137     };
       
   138 
       
   139 #endif   
       
   140             
       
   141 // End of File