realtimenetprots/sipfw/ClientResolver/Server/inc/sipcrworkerao.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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 * Name          : sipcrworkerao.h
       
    16 * Part of       : SIP / SIP Client Resolver
       
    17 * Version       : %version: 2.1.1 %
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 
       
    28 #ifndef CSIPCRWORKERAO_H
       
    29 #define CSIPCRWORKERAO_H
       
    30 
       
    31 // INCLUDES
       
    32 #include "TSipClient.h"
       
    33 #include "CSipCRServerSession.h"
       
    34 #include <e32base.h>
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class MSipCrWorkerAoObserver;
       
    38 
       
    39 
       
    40 class CSipCrWorkerAo : public CActive
       
    41     {
       
    42     public: // Constructors and desctructor
       
    43 
       
    44 	    static CSipCrWorkerAo* NewL(
       
    45 	        CSIPCRServerSession& aSession);
       
    46 	        
       
    47         static CSipCrWorkerAo* NewLC(
       
    48 	        CSIPCRServerSession& aSession);
       
    49 
       
    50 	    static CSipCrWorkerAo* NewL(
       
    51 	        TUint32 aRequestId,
       
    52             CBufBase* aSerializedSipRequest,
       
    53             HBufC8* aSipRequestBody,
       
    54             const TSipClient& aSipClient,
       
    55             const TUid& aResolverUid,
       
    56 	        CSIPCRServerSession& aSession);
       
    57 	        
       
    58         static CSipCrWorkerAo* NewLC(
       
    59 	        TUint32 aRequestId,
       
    60             CBufBase* aSerializedSipRequest,
       
    61             HBufC8* aSipRequestBody,
       
    62             const TSipClient& aSipClient,
       
    63             const TUid& aResolverUid,
       
    64 	        CSIPCRServerSession& aSession);
       
    65         
       
    66         ~CSipCrWorkerAo();
       
    67     
       
    68     public: // New functions
       
    69     
       
    70         void StartThreadL(RThread& aThread);
       
    71         CSIPCRServerSession& Session();
       
    72         CBufBase& SerializedSipRequest();
       
    73         HBufC8* GetSipRequestBody(); // Ownership transferred
       
    74         TSipClient& SipClient();
       
    75         const TUid& ResolverUid() const;           
       
    76         TUint32 RequestId() const;
       
    77         TInt CompletionCode() const;
       
    78     
       
    79     protected: // From CActive
       
    80     
       
    81 	    void RunL();
       
    82 	    void DoCancel();
       
    83 
       
    84     private: // Constructors
       
    85 
       
    86         CSipCrWorkerAo(CSIPCRServerSession& aSession);
       
    87         
       
    88         CSipCrWorkerAo(
       
    89             TUint32 aRequestId,
       
    90             const TSipClient& aSipClient,
       
    91             const TUid& aResolverUid,
       
    92             CSIPCRServerSession& aSession);
       
    93         
       
    94         void ConstructL();
       
    95         
       
    96         void ConstructL(
       
    97             CBufBase* aSerializedSipRequest,
       
    98             HBufC8* aSipRequestBody);
       
    99     
       
   100     private: // Data
       
   101     
       
   102         CSIPCRServerSession& iSession;
       
   103         TUint32 iRequestId;
       
   104         CBufBase* iSerializedSipRequest;
       
   105         HBufC8* iSipRequestBody;
       
   106         TSipClient iSipClient;
       
   107         TUid iResolverUid;
       
   108         RThread iThread;
       
   109     };
       
   110 
       
   111 #endif // CSIPCRWORKERAO_H
       
   112 
       
   113 //  End of File