drm_plat/drm_rights_api/inc/DrmRights.h
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Declaration of class DrmRights for accessing common
       
    15 *                DRM functions
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef DRMRIGHTS_H
       
    21 #define DRMRIGHTS_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <caf/caf.h>
       
    25 #include "DcfCommon.h"
       
    26 #include "DrmAsset.h"
       
    27 #include "DrmPermission.h"
       
    28 #include "DrmConstraint.h"
       
    29 
       
    30 using namespace ContentAccess;
       
    31 // TEST DEFINITION
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 *  CDRMRightsConstraints: Encapsulates rights constaints for a specific right.
       
    39 *
       
    40 *  @lib    DrmRights.dll
       
    41 *  @since  2.5
       
    42 */
       
    43 class CDRMRightsConstraints: public CBase
       
    44     {
       
    45 public:     // Data Types
       
    46     enum TConstraintPriority
       
    47         {
       
    48         ENoConstraints = 8,
       
    49         ETime = 7,
       
    50         ETimeInterval = 6,
       
    51         ETimeIntervalCount = 5,
       
    52         ETimeCount = 4,
       
    53         EInterval = 3,
       
    54         EIntervalCount = 2,
       
    55         ECount = 1
       
    56         };
       
    57 public:  // Constructors and destructor
       
    58     
       
    59     /**
       
    60     * Two-phased constructor.
       
    61     */
       
    62     IMPORT_C static CDRMRightsConstraints* NewL(void);
       
    63     
       
    64     /**
       
    65     * Destructor.
       
    66     */
       
    67     IMPORT_C virtual ~CDRMRightsConstraints(void);
       
    68     
       
    69 public: // New functions
       
    70     
       
    71     /**
       
    72     * FullRights
       
    73     * 
       
    74     * The FullRights function checks if the object contains any restrictions 
       
    75     * or if usage is unconstrained.
       
    76     *
       
    77     * @since  2.5
       
    78     * @return ETrue if this object represents unconstrained rights, EFalse if
       
    79     *         there are some constraints set
       
    80     */
       
    81     IMPORT_C TBool FullRights(void);
       
    82     
       
    83     /**
       
    84     * IsPreview
       
    85     * 
       
    86     * The function checks if the object represents a preview constraint.
       
    87     *
       
    88     * @since  2.5
       
    89     * @return ETrue if this object represents a preview constraint, EFalse
       
    90     *         otherwise
       
    91     */
       
    92     IMPORT_C TBool IsPreview(void);
       
    93 
       
    94     /**
       
    95     * GetConstraintInfo
       
    96     * 
       
    97     * The fucntion retunrs expiration and constraint details of the object  
       
    98     *
       
    99     * @since  2.5
       
   100     * @param  aExpiration: return parameter for the expiration detail of the
       
   101     *         object. EValid, EExpired, EFuture
       
   102     * @param  aConstType: return parameter for the constraint details of the
       
   103     *         object. A bitmask combination of ETimeBased, EInActiveInterval,
       
   104     *         ECountBased. Or only ENoConstraints 
       
   105     * @return Priority value of the object, if the details were returned
       
   106     *         succesfully. Priority value defines, which constraint is used
       
   107     *         during decryption. The highest one is consumed first.
       
   108     *         EInvalidRights if details cannot be retrieved. 
       
   109     */
       
   110     IMPORT_C TInt GetConstraintInfo(
       
   111         TUint32& aExpiration,
       
   112         TUint32& aConstType);
       
   113 
       
   114     /**
       
   115     * GetExpirationDetails
       
   116     * 
       
   117     * The function returns the end time and amount of counts left of the object.
       
   118     * 
       
   119     * @since  2.5
       
   120     * @param  aEndTime: return parameter for the end time value of the object.
       
   121     *         If end time restriction is not defined, parameter is set to 0.
       
   122     * @param  aCountsLeft: return parameter for amount of counts left. If count
       
   123     *         restriction is not defined, parameter is set to -1.          
       
   124     * @return EOk if details were retrieved successfully.
       
   125     * 
       
   126     */
       
   127     IMPORT_C TInt GetExpirationDetails(
       
   128         TTime& aEndTime,
       
   129         TInt& aCountsLeft);
       
   130 	
       
   131     /**
       
   132     * GetCounters
       
   133     * 
       
   134     * This function returns the current value of the count restriction and
       
   135     * original value of the count restriction(value when the rights object
       
   136         * was added to the rights database)
       
   137     *
       
   138     * @since  2.5
       
   139     * @param  aCounter: out parameter for the current counter value
       
   140     * @param  aOriginalCounter: out parameter for the original counter value
       
   141     * @return EOk if the counters were returned successfully, ENoRights if 
       
   142     *         the object does not contain count based restrictions
       
   143     */
       
   144     IMPORT_C TInt GetCounters(
       
   145         TUint32& aCounter, 
       
   146         TUint32& aOriginalCounter);
       
   147     
       
   148     /**
       
   149     * GetTimedCounters
       
   150     * 
       
   151     * This function returns the current value of the timed count restriction and
       
   152     * original value of the count restriction(value when the rights object
       
   153         * was added to the rights database)
       
   154     *
       
   155     * @since  3.0
       
   156     * @param  aCounter: out parameter for the current timed counter value
       
   157     * @param  aOriginalCounter: out parameter for the original counter value
       
   158     * @return EOk if the counters were returned successfully, ENoRights if 
       
   159     *         the object does not contain count based restrictions
       
   160     */
       
   161     IMPORT_C TInt GetTimedCounters(
       
   162         TUint32& aCounter, 
       
   163         TUint32& aOriginalCounter);
       
   164     
       
   165     /**
       
   166     * GetStartTime
       
   167     * 
       
   168     * This function returns the start time constraint.
       
   169     *
       
   170     * @since  2.5
       
   171     * @param  aStartTime: out parameter for the start time restriction
       
   172     * @return EOk if the time restriction were returned successfully, 
       
   173     *         ENoRights if the object does not contain a start time
       
   174     *         restrictions
       
   175     */
       
   176     IMPORT_C TInt GetStartTime(
       
   177         TTime& aStartTime);
       
   178     
       
   179     /**
       
   180     * GetEndTime
       
   181     * 
       
   182     * This function returns the end time constraint.
       
   183     *
       
   184     * @since  2.5
       
   185     * @param  aEndTime: out parameter for the end time restriction
       
   186     * @return EOk if the time restriction were returned successfully, 
       
   187     *         ENoRights if the object does not contain an end time
       
   188     *         restrictions
       
   189     */
       
   190     IMPORT_C TInt GetEndTime(
       
   191         TTime& aEndTime);
       
   192     
       
   193     /**
       
   194     * GetInterval
       
   195     * 
       
   196     * This function returns interval time constraint
       
   197     *
       
   198     * @since  2.5
       
   199     * @param  anInterval: out parameter for the interval restriction
       
   200     * @return EOk if the interval time restriction was returned successfully, 
       
   201     *         ENoRights if the object does not contain interval based restrictions
       
   202     */
       
   203     IMPORT_C TInt GetInterval(
       
   204         TTimeIntervalSeconds& anInterval);
       
   205     
       
   206     /**
       
   207     * GetIntervalStart
       
   208     * 
       
   209     * This function returns the start time of an activated interval
       
   210     *
       
   211     * @since  2.5
       
   212     * @param  anInterval: out parameter for the start of an activated interval 
       
   213     * @return EOk if the interval start time was returned successfully, 
       
   214     *         ENoRights if the interval has not been started yet
       
   215     */
       
   216     IMPORT_C TInt GetIntervalStart(
       
   217         TTime& aStartTime);
       
   218     
       
   219     /**
       
   220     * GetAccumulated
       
   221     * 
       
   222     * This function returns accumulated time constraint
       
   223     *
       
   224     * @since  3.0
       
   225     * @param  aAccumulated: out parameter for the accumulated time restriction
       
   226     * @return EOk if the accumulated time restriction was returned successfully, 
       
   227     *         ENoRights if the object does not contain accumulated time based restrictions
       
   228     */
       
   229     IMPORT_C TInt GetAccumulated(
       
   230         TTimeIntervalSeconds& anInterval);
       
   231     
       
   232     /**
       
   233     * SetCounters
       
   234     * 
       
   235     * Sets the counter instance variables of the rights constraint
       
   236     *
       
   237     * @since  2.5
       
   238     * @param  aCounter: the current counter value
       
   239     * @param  aOriginalCounter: the original counter value
       
   240     * @return EOk if the counters were set successfully
       
   241     */
       
   242     IMPORT_C TInt SetCounters(
       
   243         TUint32 aCounter, 
       
   244         TUint32 aOriginalCounter);
       
   245     
       
   246     /**
       
   247     * SetStartTime
       
   248     * 
       
   249     * Sets the start time constraint.
       
   250     *
       
   251     * @since  2.5
       
   252     * @param  aStartTime: the start time restriction
       
   253     * @return EOk if the time restriction was set successfully, 
       
   254     *         ENoRights if the object does not contain a start time
       
   255     *         restrictions
       
   256     */
       
   257     IMPORT_C TInt SetStartTime(
       
   258         TTime aStartTime);
       
   259     
       
   260     /**
       
   261     * SetEndTime
       
   262     * 
       
   263     * Sets the end time constraint.
       
   264     *
       
   265     * @since  2.5
       
   266     * @param  aEndTime: the end time restriction
       
   267     * @return EOk if the time restriction was set successfully, 
       
   268     */
       
   269     IMPORT_C TInt SetEndTime(
       
   270         TTime aEndTime);
       
   271     
       
   272     /**
       
   273     * SetInterval
       
   274     * 
       
   275     * Sets the interval time constraint
       
   276     *
       
   277     * @since  2.5
       
   278     * @param  anInterval: the interval restriction
       
   279     * @return EOk if the interval time restriction was set successfully.
       
   280     */
       
   281     IMPORT_C TInt SetInterval(
       
   282         TTimeIntervalSeconds anInterval);
       
   283     
       
   284     /**
       
   285     * SetIntervalStart
       
   286     * 
       
   287     * Sets the interval start time constraint
       
   288     *
       
   289     * @since  2.5
       
   290     * @param  anInterval: the interval start restriction
       
   291     * @return EOk if the interval start restriction was set successfully.
       
   292     */
       
   293     IMPORT_C TInt SetIntervalStart(
       
   294         TTime aStartTime);
       
   295     
       
   296     /**
       
   297     *
       
   298     * @since  3.0
       
   299     * @param  
       
   300     * @return 
       
   301     */
       
   302     IMPORT_C CDRMConstraint& GetConstraint(void);
       
   303 
       
   304     /**
       
   305     *
       
   306     * @since  3.0
       
   307     * @param  
       
   308     * @return 
       
   309     */
       
   310     IMPORT_C void SetConstraint(CDRMConstraint&);
       
   311 
       
   312     /**
       
   313     * operator=
       
   314     * 
       
   315     * Assignment operator.
       
   316     *
       
   317     * @since  2.5
       
   318     * @param  aConstraint: constraint to copy data from
       
   319     * @return a copy of the aConstraint parameter.
       
   320     */
       
   321     IMPORT_C CDRMRightsConstraints& operator=(
       
   322         CDRMRightsConstraints& aConstraint);
       
   323 
       
   324 protected:
       
   325     
       
   326     /**
       
   327     * Default constructor.
       
   328     */
       
   329     IMPORT_C CDRMRightsConstraints(void);
       
   330     
       
   331     /**
       
   332     * 2nd phase constructor.
       
   333     */
       
   334     IMPORT_C void ConstructL(void);
       
   335     
       
   336     
       
   337 protected: // Data
       
   338 
       
   339     CDRMConstraint* iConstraint;    
       
   340     };
       
   341 
       
   342 // CLASS DECLARATION
       
   343 
       
   344 /**
       
   345 *  CDRMRights: Encapsulates a single rights object.
       
   346 *
       
   347 *  @lib    DrmRights.dll
       
   348 *  @since  2.5
       
   349 */
       
   350 class CDRMRights: public CBase, public MAgentRightsBase
       
   351     {
       
   352 public:     // Data Types
       
   353     enum TExpiration
       
   354         {
       
   355         EValidRights = 100,
       
   356         EFutureRights = 10,
       
   357         EExpiredRights = 1 
       
   358         };
       
   359     
       
   360     enum TConstraintType
       
   361         {
       
   362         ENoConstraints = 0x0001,
       
   363         ETimeBased = 0x0002,
       
   364         EInActiveInterval = 0x0004,
       
   365         ECountBased = 0x0008,
       
   366         ETimeIsAccumulatedTime = 0x0010
       
   367         };
       
   368     
       
   369     enum TRestriction
       
   370         {
       
   371         EFullRights = 1, 
       
   372         ERestrictedRights,
       
   373         EPreviewRights
       
   374         };
       
   375 
       
   376     enum
       
   377         {
       
   378         EPlay = ContentAccess::EPlay,
       
   379         EDisplay = ContentAccess::EView, 
       
   380         EExecute = ContentAccess::EExecute, 
       
   381         EPrint = ContentAccess::EPrint, 
       
   382         EInstall = ContentAccess::EInstall, 
       
   383         };
       
   384 
       
   385     enum TConsumeAction
       
   386         {
       
   387         EStart,
       
   388         EFinish,
       
   389         };
       
   390     
       
   391     enum
       
   392         {
       
   393         EOk = KErrNone, 
       
   394         EGeneralError = -30100, 
       
   395         EUnknownMIME = -30101, 
       
   396         EVersionNotSupported = -30102, 
       
   397         ESessionError = -30103, 
       
   398         ENoRights = KErrCANoRights, 
       
   399         ERightsDBCorrupted = -30105, 
       
   400         EUnsupported = KErrCANotSupported, 
       
   401         ERightsExpired = KErrCANoPermission, 
       
   402         EInvalidRights = -30108
       
   403         };
       
   404     
       
   405     enum
       
   406         {
       
   407         EForwardLock = 0x0001, 
       
   408         ECombinedDelivery = 0x0002, 
       
   409         ESeparateDelivery = 0x0004, 
       
   410         ESuperDistribution = 0x0008
       
   411         };
       
   412 
       
   413 public:  // Constructors and destructor
       
   414     
       
   415     /**
       
   416     * Two-phased constructor.
       
   417     */
       
   418     IMPORT_C static CDRMRights* NewL(void);
       
   419     
       
   420     /**
       
   421     * Destructor.
       
   422     */
       
   423     IMPORT_C virtual ~CDRMRights(void);
       
   424     
       
   425 public: // New functions
       
   426     
       
   427     /**
       
   428     * GetContentURI
       
   429     * 
       
   430     * This function returns the content URI of the object
       
   431     *
       
   432     * @since  2.5
       
   433     * @param  aContentURI: out parameter for the content URI.
       
   434     * @return EOk if the URI was returned successfully.
       
   435     */
       
   436     IMPORT_C TInt GetContentURI(
       
   437         HBufC8*& aContentURI);
       
   438     
       
   439     /**
       
   440     * GetLocalID
       
   441     * 
       
   442     * This function returns the local ID of the object
       
   443     *
       
   444     * @since  2.5
       
   445     * @return the local ID.
       
   446     */
       
   447     IMPORT_C TUint32 GetLocalID(void);
       
   448     
       
   449     /**
       
   450     * GetAddTime
       
   451     * 
       
   452     * This function returns the time when the rights object was added to the
       
   453     * rights database
       
   454     *
       
   455     * @since  2.5
       
   456     * @param  aTime: out parameter for the time.
       
   457     */
       
   458     IMPORT_C void GetAddTime(
       
   459         TTime& aTime);
       
   460     
       
   461     /**
       
   462     * GetRightsInfo
       
   463     * 
       
   464     * This function returns the restriction details associated with given
       
   465     * permission.
       
   466     *
       
   467     * @since  2.5
       
   468     * @param  aConstraintSpec: The permissions to be checked defined as a 
       
   469     *         bitmask combination of EPlay, EDisplay, EExecute and EPrint
       
   470     * @param  aRestriction: return paramer for the restriction detail of the
       
   471     *         object: EFullRights, ERestrictedRights or EPreviewRights
       
   472     * @param  aExpiration: return parameter for the expiration detail of the
       
   473     *         object: EValid, EExpired, EFuture
       
   474     * @param  aConstType: return parameter for the constraint details of the
       
   475     *         object. ETimeBased, EInActiveInterval, ECountBased or ENoConstraints 
       
   476     * @return Priority value of the object, if the details were returned
       
   477     *         succesfully. Priority value defines, which object is used
       
   478     *         during decryption. The value is calculated with formula:
       
   479     *         TConstraintPriority * TRightsExpiration.
       
   480     *         ENoRights if no rights for given permissions.	      
       
   481     */
       
   482     IMPORT_C TInt GetRightsInfo(
       
   483         TUint32 aConstraintSpec,
       
   484         TRestriction& aRestriction,
       
   485         TExpiration& aExpiration,
       
   486         TUint32& aConstType);
       
   487 
       
   488     /**
       
   489     * GetExpirationDetails
       
   490     * 
       
   491     * The function returns the end time and amount of counts left of the object
       
   492     * associated with given permission. The use of this method is only recommended
       
   493     * for objects, which contain a end time or a count restriction. The constraint
       
   494     * type information can be retrieved with e.g. GetRightsInfo -function.
       
   495     * In cases of full rights and inactive interval rights the aEndTime is set to
       
   496     * 0 and the aCountsLeft is set to < 0.
       
   497     * 
       
   498     * @since  2.5
       
   499     * @param  aConstraintSpec: The permissions to be checked defined as a 
       
   500     *         bitmask combination of EPlay, EDisplay, EExecute and EPrint.
       
   501     * @param  aEndTime: return parameter for the end time value of the object.
       
   502     *         If end time restriction is not defined, parameter is set to 0.
       
   503     * @param  aCountsLeft: return parameter for amount of counts left. If count
       
   504     *         restriction is not defined, parameter is set to -1.          
       
   505     * @return EOk if details were retrieved successfully. ENoRights if no rights
       
   506     *         for given permissions.	 
       
   507     */
       
   508     IMPORT_C TInt GetExpirationDetails(
       
   509         TUint32 aConstraintSpec,
       
   510         TTime& aEndTime,
       
   511         TInt& aCountsLeft);
       
   512     
       
   513     /**
       
   514     * GetPlayRight
       
   515     * 
       
   516     * This function returns the constraints associated with the play right.
       
   517     *
       
   518     * @since  2.5
       
   519     * @param  aConstraint: out parameter for the constraints associated with
       
   520     *         this right. It must be deleted by the caller.
       
   521     * @return EOk if the right exists and the associated restrictions were 
       
   522     *         returned successfully, ENoRights if the object does not contain
       
   523     *         the given right.
       
   524     */
       
   525     IMPORT_C TInt GetPlayRight(
       
   526         CDRMRightsConstraints*& aConstraint);
       
   527     
       
   528     /**
       
   529     * GetDisplayRight
       
   530     * 
       
   531     * This function returns the constraints associated with the display right.
       
   532     *
       
   533     * @since  2.5
       
   534     * @param  aConstraint: out parameter for the constraints associated with
       
   535     *         this right. It must be deleted by the caller.
       
   536     * @return EOk if the right exists and the associated restrictions were 
       
   537     *         returned successfully, ENoRights if the object does not contain
       
   538     *         the given right.
       
   539     */
       
   540     IMPORT_C TInt GetDisplayRight(
       
   541         CDRMRightsConstraints*& aConstraint);
       
   542     
       
   543     /**
       
   544     * GetPrintRight
       
   545     * 
       
   546     * This function returns the constraints associated with the print right.
       
   547     *
       
   548     * @since  2.5
       
   549     * @param  aConstraint: out parameter for the constraints associated with
       
   550     *         this right. It must be deleted by the caller.
       
   551     * @return EOk if the right exists and the associated restrictions were 
       
   552     *         returned successfully, ENoRights if the object does not contain
       
   553     *         the given right.
       
   554     */
       
   555     IMPORT_C TInt GetPrintRight(
       
   556         CDRMRightsConstraints*& aConstraint);
       
   557     
       
   558     /**
       
   559     * GetExecuteRight
       
   560     * 
       
   561     * This function returns the constraints associated with the execute right.
       
   562     *
       
   563     * @since  2.5
       
   564     * @param  aConstraint: out parameter for the constraints associated with
       
   565     *         this right. It must be deleted by the caller.
       
   566     * @return EOk if the right exists and the associated restrictions were 
       
   567     *         returned successfully, ENoRights if the object does not contain
       
   568     *         the given right.
       
   569     */
       
   570     IMPORT_C TInt GetExecuteRight(
       
   571         CDRMRightsConstraints*& aConstraint);
       
   572     
       
   573     /**
       
   574     * GetContentURIAndLocalID
       
   575     * 
       
   576     * This function sets the content URI and local ID of the object.
       
   577     *
       
   578     * @since  2.5
       
   579     * @param  aContentURI: the new content URI.
       
   580     * @param  aLocalID: the new local ID.
       
   581     * @return EOk if the values were set successfully.
       
   582     */
       
   583     IMPORT_C TInt SetContentURIAndLocalID(
       
   584         HBufC8* aContentURI, 
       
   585         TUint32 aLocalID);
       
   586 
       
   587     IMPORT_C TInt SetContentURI(
       
   588         HBufC8* aContentURI);
       
   589 
       
   590     IMPORT_C TInt SetLocalID(
       
   591         TUint32 aLocalID);
       
   592     
       
   593     /**
       
   594     * SetAddTime
       
   595     * 
       
   596     * Sets the add time of the object.
       
   597     *
       
   598     * @since  2.5
       
   599     * @param  aTime: the new add time.
       
   600     * @return EOk if the value was set successfully.
       
   601     */
       
   602     IMPORT_C void SetAddTime(
       
   603         TTime aTime);
       
   604     
       
   605     /**
       
   606     * SetPlayRight
       
   607     * 
       
   608     * This function sets the play constraints.
       
   609     *
       
   610     * @since  2.5
       
   611     * @param  aConstraint: the constraints associated with the play right.
       
   612     *         It must be deleted by the caller.
       
   613     * @return EOk if the restrictions were set successfully
       
   614     */
       
   615     IMPORT_C TInt SetPlayRight(
       
   616         CDRMRightsConstraints* aConstraint);
       
   617     
       
   618     /**
       
   619     * SetDisplayRight
       
   620     * 
       
   621     * This function sets the constraints.
       
   622     *
       
   623     * @since  2.5
       
   624     * @param  aConstraint: the constraints associated with the display right.
       
   625     *         It must be deleted by the caller. 
       
   626     * @return EOk if the restrictions were set successfully
       
   627     */
       
   628     IMPORT_C TInt SetDisplayRight(
       
   629         CDRMRightsConstraints* aConstraint);
       
   630     
       
   631     /**
       
   632     * SetPrintRight
       
   633     * 
       
   634     * This function sets the print constraints.
       
   635     *
       
   636     * @since  2.5
       
   637     * @param  aConstraint: the constraints associated with the print right.
       
   638     *         It must be deleted by the caller.
       
   639     * @return EOk if the restrictions were set successfully
       
   640     */
       
   641     IMPORT_C TInt SetPrintRight(
       
   642         CDRMRightsConstraints* aConstraint);
       
   643     
       
   644     /**
       
   645     * SetExecuteRight
       
   646     * 
       
   647     * This function sets the execute constraints.
       
   648     *
       
   649     * @since  2.5
       
   650     * @param  aConstraint: the constraints associated with the execute right.
       
   651     *         It must be deleted by the caller.
       
   652     * @return EOk if the restrictions were set successfully
       
   653     */
       
   654     IMPORT_C TInt SetExecuteRight(
       
   655         CDRMRightsConstraints* aConstraint);
       
   656     
       
   657     /**
       
   658     * operator=
       
   659     * 
       
   660     * Assignment operator.
       
   661     *
       
   662     * @since  2.5
       
   663     * @param  aRight: object to copy data from
       
   664     * @return a copy of the aRight parameter.
       
   665     */
       
   666     IMPORT_C CDRMRights& operator=(
       
   667         CDRMRights& aRight);
       
   668 
       
   669     /**
       
   670     * 
       
   671     *
       
   672     * @since  3.0
       
   673     * @param  
       
   674     * @return 
       
   675     */
       
   676     IMPORT_C CDRMPermission& GetPermission(void);
       
   677 
       
   678     /**
       
   679     * Permission needs to be freed, doesn't take control
       
   680     *
       
   681     * @since  3.0
       
   682     * @param  
       
   683     * @return 
       
   684     */
       
   685     IMPORT_C void SetPermissionL(CDRMPermission& aPermission);
       
   686 
       
   687     /**
       
   688     * 
       
   689     *
       
   690     * @since  3.0
       
   691     * @param  
       
   692     * @return 
       
   693     */
       
   694     IMPORT_C CDRMAsset& GetAsset(void);
       
   695 
       
   696     /**
       
   697     * Asset needs to be freed, doesn't take control
       
   698     *
       
   699     * @since  3.0
       
   700     * @param  
       
   701     * @return 
       
   702     */
       
   703     IMPORT_C void SetAssetL(CDRMAsset& aAsset);
       
   704     
       
   705     /**
       
   706     * 
       
   707     *
       
   708     * @since  3.0
       
   709     * @param  
       
   710     * @return 
       
   711     */
       
   712     IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
       
   713 
       
   714     /**
       
   715     * 
       
   716     *
       
   717     * @since  3.0
       
   718     * @param  
       
   719     * @return 
       
   720     */
       
   721 	IMPORT_C void InternalizeL(RReadStream& aStream);
       
   722     
       
   723     /**
       
   724     * Merge with another rights object
       
   725     *
       
   726     * @since  3.0
       
   727     * @param  
       
   728     * @return 
       
   729     */
       
   730 	IMPORT_C void Merge(const CDRMRights& aRights);
       
   731     
       
   732 protected:
       
   733     
       
   734     /**
       
   735     * Default constructor.
       
   736     */
       
   737     IMPORT_C CDRMRights(void);
       
   738     
       
   739     /**
       
   740     * 2nd phase constructor.
       
   741     */
       
   742     IMPORT_C void ConstructL(void);
       
   743     
       
   744     
       
   745 protected: // Data
       
   746 
       
   747     CDRMAsset* iAsset;
       
   748     CDRMPermission* iPermission;
       
   749     };
       
   750 
       
   751 #endif      // DRMRIGHTS_H   
       
   752 
       
   753 // End of File