ncdengine/inc/ncdproviderpcclientsupport.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2006 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:   Contains MNcdProvider interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_NCD_PROVIDER_PC_CLIENT_SUPPORT_H
       
    20 #define M_NCD_PROVIDER_PC_CLIENT_SUPPORT_H
       
    21 
       
    22 
       
    23 #include <e32cmn.h>
       
    24 #include "catalogsbase.h"
       
    25 #include "ncdinterfaceids.h"
       
    26 
       
    27 class MNcdRightsObjectOperation;
       
    28 class MNcdRightsObjectOperationObserver;
       
    29 class MNcdCreateAccessPointOperation;
       
    30 class MNcdCreateAccessPointOperationObserver;
       
    31 class MNcdSendHttpRequestOperation;
       
    32 class MNcdSendHttpRequestOperationObserver;
       
    33 class TNcdConnectionMethod;
       
    34 
       
    35 /**
       
    36  *  MNcdProviderPcClientSupport provides provider functionality specifically needed
       
    37  *  for Catalogs PC Client connectivity.
       
    38  *
       
    39  *  
       
    40  */
       
    41 class MNcdProviderPcClientSupport : public virtual MCatalogsBase
       
    42 
       
    43     {
       
    44 public:
       
    45 
       
    46 
       
    47     /**
       
    48      * Unique identifier for the interface, required for all MCatalogsBase interfaces.
       
    49      *
       
    50      * 
       
    51      */
       
    52     enum { KInterfaceUid = ENcdProviderPcClientSupportUid };
       
    53 
       
    54 
       
    55     /**
       
    56      * Create an operation for downloading and installing a DRM rights object.
       
    57      *
       
    58      * 
       
    59      * @param aObserver Observer interface to receive operation completion etc callbacks.
       
    60      * @param aDownloadUri Full URI to the rights object to download.
       
    61      * @param aMimeType Mime type of the rights object.
       
    62      * @param aConnectionMethod Network connection method
       
    63      */
       
    64     virtual MNcdRightsObjectOperation* DownloadAndInstallRightsObjectL(
       
    65         MNcdRightsObjectOperationObserver& aObserver,
       
    66         const TDesC& aDownloadUri, 
       
    67         const TDesC& aMimeType, 
       
    68         const TNcdConnectionMethod& aConnectionMethod ) = 0;
       
    69 
       
    70     /**
       
    71      * Create an access point for PC Client use. If the given access point is not yet
       
    72      * installed on the phone, it is installed temporarily for the PC client session.
       
    73      *
       
    74      * @param aAccessPointData Configuration protocol detail XML fragment describing the
       
    75      *  access point.
       
    76      * @return Operation that creates the accesspoint
       
    77      * @leave KErrArgument if aAccessPointData is empty
       
    78      */
       
    79     virtual MNcdCreateAccessPointOperation* CreateAccessPointL( 
       
    80         const TDesC& aAccessPointData,
       
    81         MNcdCreateAccessPointOperationObserver& aObserver ) = 0;
       
    82 
       
    83 
       
    84     /**
       
    85      * Send a standard HTTP request
       
    86      *
       
    87      * The request must be a valid HTTP/1.1 request. Only POST, GET and HEAD methods
       
    88      * are supported.
       
    89      *
       
    90      * Note that Request-URI and Host-header that are in the request are ignored and
       
    91      * aUri is used as the destination URI instead.
       
    92      *
       
    93      * @param aUri Request URI.
       
    94      * @param aRequest Request data
       
    95      * @param aConnectionMethod Network connection method          
       
    96      */
       
    97     virtual MNcdSendHttpRequestOperation* SendHttpRequestL(
       
    98         const TDesC8& aUri,
       
    99         const TDesC8& aRequest, 
       
   100         const TNcdConnectionMethod& aConnectionMethod, 
       
   101         MNcdSendHttpRequestOperationObserver& aObserver ) = 0;
       
   102 
       
   103     
       
   104 protected:
       
   105 
       
   106     /**
       
   107      * Destructor.
       
   108      *
       
   109      * @see MCatalogsBase::~MCatalogsBase
       
   110      */
       
   111     virtual ~MNcdProviderPcClientSupport() {}
       
   112 
       
   113     };
       
   114 
       
   115 
       
   116 #endif // M_NCD_PROVIDER_PC_CLIENT_SUPPORT_H