drm_pub/drm_helper_api/inc/RDRMHelper.h
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2004 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:  the client side class for DRMHelperServer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef RDRMHELPER_H
       
    20 #define RDRMHELPER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 // DATA TYPES
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 
       
    32 
       
    33 
       
    34 /**
       
    35 *  This class provides the client-side interface to the server session
       
    36 *
       
    37 *  @since Series 60 2.6
       
    38 */
       
    39 
       
    40 class RDRMHelper : public RSessionBase
       
    41     {
       
    42     public:  // Constructors and destructor
       
    43 
       
    44         /**
       
    45         * C++ default constructor.
       
    46         */
       
    47 	    RDRMHelper();
       
    48 
       
    49     public:  // New functions
       
    50       
       
    51         /**
       
    52         * Connects to server.
       
    53         * @return System-wide error code
       
    54         */
       
    55 	    TInt Connect();
       
    56 
       
    57         /**
       
    58         * Gets the version number 
       
    59         * @return version number
       
    60         */
       
    61 	    TVersion Version() const;
       
    62 
       
    63         /**
       
    64         * Register the given content uri as an automated content.
       
    65         * @param aUri: content URI
       
    66         * @param aActive: active or passive registration
       
    67         * @param aAutomatedType: type of automated content
       
    68         * @param aIntent: intent how content is used
       
    69         * @return System-wide error code
       
    70         */
       
    71         TInt SetAutomated( 
       
    72             const TDesC8& aUri, 
       
    73             TBool aActive, 
       
    74             TInt aAutomatedType, 
       
    75             TInt aIntent ) const;
       
    76 
       
    77         /**
       
    78         * Unregister the given content.
       
    79         * @param aUri: content URI
       
    80         * @param aActive: active or passive registration
       
    81         * @param aAutomatedType: type of automated content
       
    82         * @param aIntent: intent how content is used
       
    83         * @return System-wide error code
       
    84         */
       
    85         TInt RemoveAutomated( 
       
    86             const TDesC8& aUri, 
       
    87             TBool aActive, 
       
    88             TInt aAutomatedType, 
       
    89             TInt aIntent ) const;
       
    90 
       
    91         /**
       
    92         * Unregister all instances of the given content.
       
    93         * @param aUri: content URI
       
    94         * @param aActive: active or passive registration
       
    95         * @param aAutomatedType: type of automated content
       
    96         * @param aIntent: intent how content is used
       
    97         * @return System-wide error code
       
    98         */
       
    99         TInt RemoveAutomatedAll( 
       
   100             const TDesC8& aUri, 
       
   101             TBool aActive, 
       
   102             TInt aAutomatedType, 
       
   103             TInt aIntent ) const;
       
   104 
       
   105         /**
       
   106         * Indicate that idle-screen has been activated.
       
   107         * @return System-wide error code
       
   108         */
       
   109         TInt IndicateIdle() const;       
       
   110 
       
   111         /**
       
   112         * Has given content been registered as automated content.
       
   113         * @param aUri content URI of the content
       
   114         * @param aAutomated (out) ETrue if registered as automated.
       
   115         * @param aType (out) Tells whether content has been registered as active or passive.
       
   116         * @return System-wide error code
       
   117         */
       
   118         TInt IsAutomated( 
       
   119             const TDesC8& aUri,
       
   120             TInt aAutomatedType, 
       
   121             TInt aIntent, 
       
   122             TBool& aAutomated, 
       
   123             TInt& aType ) const;       
       
   124 
       
   125     private:
       
   126         
       
   127         TInt StartServer();
       
   128         TInt CreateServerProcess();
       
   129     };
       
   130 
       
   131 
       
   132 
       
   133 #endif      // DRMHELPERCLIENT_H   
       
   134             
       
   135 // End of File