drm_pub/drm_helper_api/inc/RDRMHelper.h
author William Roberts <williamr@symbian.org>
Wed, 28 Apr 2010 22:11:01 +0100
branchRCL_3
changeset 26 c8580ce65571
parent 0 95b198f216e5
permissions -rw-r--r--
Remerge fixes for Bug 2121 and Bug 1993 - Bug 1993 is partially implemented in "Revision: 201015" which has removed the CMLA RnD key exports, so I've stopped creating omadrm/rndcerts/group/bld.inf - The CryptoPrep.flm fix (Bug 2121) is unchanged, as I don't like the latest changes to add the exported file to the "sbs -what" output

/*
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  the client side class for DRMHelperServer
*
*/


#ifndef RDRMHELPER_H
#define RDRMHELPER_H

// INCLUDES
#include <e32base.h>

// DATA TYPES

// FORWARD DECLARATIONS

// CLASS DECLARATION




/**
*  This class provides the client-side interface to the server session
*
*  @since Series 60 2.6
*/

class RDRMHelper : public RSessionBase
    {
    public:  // Constructors and destructor

        /**
        * C++ default constructor.
        */
	    RDRMHelper();

    public:  // New functions
      
        /**
        * Connects to server.
        * @return System-wide error code
        */
	    TInt Connect();

        /**
        * Gets the version number 
        * @return version number
        */
	    TVersion Version() const;

        /**
        * Register the given content uri as an automated content.
        * @param aUri: content URI
        * @param aActive: active or passive registration
        * @param aAutomatedType: type of automated content
        * @param aIntent: intent how content is used
        * @return System-wide error code
        */
        TInt SetAutomated( 
            const TDesC8& aUri, 
            TBool aActive, 
            TInt aAutomatedType, 
            TInt aIntent ) const;

        /**
        * Unregister the given content.
        * @param aUri: content URI
        * @param aActive: active or passive registration
        * @param aAutomatedType: type of automated content
        * @param aIntent: intent how content is used
        * @return System-wide error code
        */
        TInt RemoveAutomated( 
            const TDesC8& aUri, 
            TBool aActive, 
            TInt aAutomatedType, 
            TInt aIntent ) const;

        /**
        * Unregister all instances of the given content.
        * @param aUri: content URI
        * @param aActive: active or passive registration
        * @param aAutomatedType: type of automated content
        * @param aIntent: intent how content is used
        * @return System-wide error code
        */
        TInt RemoveAutomatedAll( 
            const TDesC8& aUri, 
            TBool aActive, 
            TInt aAutomatedType, 
            TInt aIntent ) const;

        /**
        * Indicate that idle-screen has been activated.
        * @return System-wide error code
        */
        TInt IndicateIdle() const;       

        /**
        * Has given content been registered as automated content.
        * @param aUri content URI of the content
        * @param aAutomated (out) ETrue if registered as automated.
        * @param aType (out) Tells whether content has been registered as active or passive.
        * @return System-wide error code
        */
        TInt IsAutomated( 
            const TDesC8& aUri,
            TInt aAutomatedType, 
            TInt aIntent, 
            TBool& aAutomated, 
            TInt& aType ) const;       

    private:
        
        TInt StartServer();
        TInt CreateServerProcess();
    };



#endif      // DRMHELPERCLIENT_H   
            
// End of File