omadrm/drmhelper/inc/ConsumeData.h
changeset 23 493788a4a8a4
parent 0 95b198f216e5
equal deleted inserted replaced
5:79d62d1d7957 23:493788a4a8a4
    20 #define CONSUMEDATA_H
    20 #define CONSUMEDATA_H
    21 
    21 
    22 // INCLUDES
    22 // INCLUDES
    23 #include <e32base.h>
    23 #include <e32base.h>
    24 #include <caf/caf.h>
    24 #include <caf/caf.h>
    25 #include <drmrightsclient.h>
    25 #include <DRMRightsClient.h>
    26 
    26 
    27 // DATA TYPES
    27 // DATA TYPES
    28 
    28 
    29 // FORWARD DECLARATIONS
    29 // FORWARD DECLARATIONS
    30 
    30 
    38 */
    38 */
    39 
    39 
    40 NONSHARABLE_CLASS( CConsumeData )  : public CBase
    40 NONSHARABLE_CLASS( CConsumeData )  : public CBase
    41     {
    41     {
    42     public:  // Constructors and destructor
    42     public:  // Constructors and destructor
    43     
    43 
    44 		/**
    44         /**
    45         * NewLC
    45         * NewLC
    46         *
    46         *
    47 		* Created a new instance of the CConsumeData class and leaves
    47         * Created a new instance of the CConsumeData class and leaves
    48 		* it into the cleanup stack
    48         * it into the cleanup stack
    49 		*
    49         *
    50         * @param aUri: Content identifier of the content in question
    50         * @param aUri: Content identifier of the content in question
    51 		* @return Functional CConsumeData -object
    51         * @return Functional CConsumeData -object
    52         */
    52         */
    53         static CConsumeData* NewLC( const TDesC8& aUri );
    53         static CConsumeData* NewLC( const TDesC8& aUri );
    54 
    54 
    55     
    55 
    56 		/**
    56         /**
    57         * NewL
    57         * NewL
    58         *
    58         *
    59 		* Created a new instance of the CConsumeData class
    59         * Created a new instance of the CConsumeData class
    60 		*
    60         *
    61         * @param aUri: Content identifier of the content in question
    61         * @param aUri: Content identifier of the content in question
    62 		* @return Functional CConsumeData -object
    62         * @return Functional CConsumeData -object
    63         */
    63         */
    64         static CConsumeData* NewL( const TDesC8& aUri );
    64         static CConsumeData* NewL( const TDesC8& aUri );
    65         
    65 
    66         /**
    66         /**
    67         * Destructor
    67         * Destructor
    68         */
    68         */
    69         ~CConsumeData();
    69         ~CConsumeData();
    70         
    70 
    71     public:  // New functions
    71     public:  // New functions
    72     
    72 
    73  		/**
    73         /**
    74         * Consume
    74         * Consume
    75         *
    75         *
    76 		* Calls client consumption, if you call this with stop, the session
    76         * Calls client consumption, if you call this with stop, the session
    77 		* is deleted
    77         * is deleted
    78 		*
    78         *
    79         * @param aIntent: Intent to be used for consumption
    79         * @param aIntent: Intent to be used for consumption
    80 		* @return Symbian OS error code
    80         * @return Symbian OS error code
    81         */         
    81         */
    82         TInt Consume( const ContentAccess::TIntent& aIntent );
    82         TInt Consume( const ContentAccess::TIntent& aIntent );
    83 
    83 
    84  		/**
    84         /**
    85         * CompateUri();
    85         * CompateUri();
    86         *
    86         *
    87 		* Compares the uri as if compared with string compare
    87         * Compares the uri as if compared with string compare
    88 		*
    88         *
    89         * @param aIntent: Intent to be used for consumption
    89         * @param aIntent: Intent to be used for consumption
    90 		* @return Symbian OS error code
    90         * @return Symbian OS error code
    91         */         
    91         */
    92         TInt CompareUri( const TDesC8& aUri ) const;        
    92         TInt CompareUri( const TDesC8& aUri ) const;
    93 
    93 
    94     private:
    94     private:
    95         /**
    95         /**
    96         * C++ default constructor.
    96         * C++ default constructor.
    97         */
    97         */
   102         */
   102         */
   103         void ConstructL( const TDesC8& aUri );
   103         void ConstructL( const TDesC8& aUri );
   104 
   104 
   105         // Content uri of the content being used
   105         // Content uri of the content being used
   106         HBufC8* iContentURI8;
   106         HBufC8* iContentURI8;
   107         
   107 
   108         // Rights Client instance
   108         // Rights Client instance
   109        	RDRMRightsClient iRdb;
   109         RDRMRightsClient iRdb;
   110        	
   110 
   111        	// Connection status
   111         // Connection status
   112        	TBool iConnectionStatus;
   112         TBool iConnectionStatus;
   113     };
   113     };
   114 
   114 
   115 
   115 
   116 
   116 
   117 #endif      // CONSUMEDATA_H   
   117 #endif      // CONSUMEDATA_H
   118             
   118 
   119 // End of File
   119 // End of File