ncdengine/provider/server/inc/ncdhttputils.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_NCDHTTPUTILS_H
       
    20 #define C_NCDHTTPUTILS_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 #include "catalogshttpincludes.h"
       
    25 #include "catalogsaccesspointmanager.h"
       
    26 
       
    27 class CNcdNodeIdentifier;
       
    28 class TNcdConnectionMethod;
       
    29 
       
    30 /**
       
    31  * Utils for creating HTTP transactions
       
    32  */
       
    33 class CNcdHttpUtils : public CBase
       
    34     {
       
    35 public:
       
    36 
       
    37     CNcdHttpUtils(         
       
    38         MCatalogsAccessPointManager& aAccessPointManager );
       
    39         
       
    40 
       
    41     void CreateTransactionL( 
       
    42         MCatalogsHttpSession& aSession,
       
    43         MCatalogsHttpOperation*& aOperation,
       
    44         const TDesC& aUri,
       
    45         MCatalogsHttpObserver& aObserver,
       
    46         const TDesC8& aBody );
       
    47 
       
    48     void CreateTransactionL( 
       
    49         MCatalogsHttpSession& aSession,
       
    50         MCatalogsHttpOperation*& aOperation,
       
    51         const TDesC& aUri,
       
    52         MCatalogsHttpObserver& aObserver,
       
    53         const TDesC8& aBody,
       
    54         const TDesC& aNamespace,
       
    55         const MCatalogsAccessPointManager::TAction& aAction, 
       
    56         const TUid& aClientUid );
       
    57 
       
    58     void CreateTransactionL( 
       
    59         MCatalogsHttpSession& aSession,
       
    60         MCatalogsHttpOperation*& aOperation,
       
    61         const TDesC& aUri,
       
    62         MCatalogsHttpObserver& aObserver,
       
    63         const TDesC8& aBody,
       
    64         const TDesC& aNamespace,
       
    65         const TDesC& aCatalogId,
       
    66         const MCatalogsAccessPointManager::TAction& aAction, 
       
    67         const TUid& aClientUid );
       
    68 
       
    69 
       
    70     void CreateTransactionL( 
       
    71         MCatalogsHttpSession& aSession,
       
    72         MCatalogsHttpOperation*& aOperation,
       
    73         const TDesC& aUri,
       
    74         MCatalogsHttpObserver& aObserver,
       
    75         const TDesC8& aBody,
       
    76         const CNcdNodeIdentifier& aNodeIdentifier,
       
    77         const MCatalogsAccessPointManager::TAction& aAction, 
       
    78         const TUid& aClientUid );
       
    79 
       
    80 
       
    81     void CreateTransactionL( 
       
    82         MCatalogsHttpSession& aSession,
       
    83         MCatalogsHttpOperation*& aOperation,
       
    84         const TDesC& aUri,
       
    85         MCatalogsHttpObserver& aObserver,
       
    86         const TDesC8& aBody,
       
    87         const CNcdNodeIdentifier& aNodeIdentifier,
       
    88         const CNcdNodeIdentifier& aBackupNodeIdentifier,
       
    89         const MCatalogsAccessPointManager::TAction& aAction, 
       
    90         const TUid& aClientUid );
       
    91 
       
    92 
       
    93     void ConvertConnectionMethod(
       
    94         const TNcdConnectionMethod& aSource,
       
    95         TCatalogsConnectionMethod& aTarget ) const;
       
    96 
       
    97 private:
       
    98 
       
    99     void SetAccessPoint(
       
   100         MCatalogsHttpOperation& aOperation,
       
   101         TInt aError,
       
   102         TUint32 aAp );
       
   103  
       
   104         
       
   105 private:
       
   106 
       
   107     MCatalogsAccessPointManager& iAccessPointManager;    
       
   108             
       
   109     };
       
   110 
       
   111 #endif // C_NCDTRANSACTIONUTILS_H
       
   112