epoc32/include/caf/caftypes.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@2
     5
* under the terms of the License "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description: 
williamr@2
    15
* This file contains enumerations and constants used throughout the 
williamr@2
    16
* content access framework
williamr@2
    17
*
williamr@2
    18
*/
williamr@2
    19
williamr@2
    20
williamr@2
    21
/**
williamr@2
    22
 @file
williamr@4
    23
 @publishedAll
williamr@2
    24
 @released
williamr@2
    25
*/
williamr@2
    26
williamr@2
    27
#ifndef __CAF_TYPES_H__
williamr@2
    28
#define __CAF_TYPES_H__
williamr@2
    29
williamr@2
    30
#include <e32std.h>
williamr@2
    31
williamr@2
    32
namespace ContentAccess
williamr@2
    33
	{
williamr@2
    34
#ifndef REMOVE_CAF1
williamr@2
    35
	/** @deprecated */
williamr@2
    36
	enum TQosAttribute
williamr@2
    37
		{
williamr@2
    38
		EQosBufferSize   = 0,  ///< Size of read buffer suggested by client
williamr@2
    39
		EQosAttrTop // Must always be last sequential entry
williamr@2
    40
		};
williamr@2
    41
williamr@2
    42
	/**
williamr@2
    43
	 Defines an internal set of 'standard' MIME header fields. These allow an agent
williamr@2
    44
	 to quickly read the value of a field when importing files
williamr@2
    45
williamr@2
    46
	 @deprecated 
williamr@2
    47
	 */
williamr@2
    48
	enum TMimeFields
williamr@2
    49
		{
williamr@2
    50
		EContentType				= 0,	///< Content-Type :
williamr@2
    51
		EContentLength				= 1,	///< Content-Length :
williamr@2
    52
		EContentId					= 2,    ///< Content-Id:
williamr@2
    53
		EContentTransferEncoding	= 3,    ///< Content-Transfer-Encoding:
williamr@2
    54
		EBoundary					= 4,    ///< Boundary:
williamr@2
    55
		EMimeMax				    		///< indicates the end of this enumeration
williamr@2
    56
		}; 
williamr@2
    57
#endif // REMOVE_CAF1
williamr@2
    58
	
williamr@2
    59
	/** Defines the share modes available when opening content for consumption. These
williamr@2
    60
	modes have no effect unless the content is a file stored on the device.
williamr@2
    61
	Remember to update any DRM agents if new values are added here.
williamr@2
    62
	*/
williamr@2
    63
	enum TContentShareMode
williamr@2
    64
		{
williamr@2
    65
		EContentShareReadOnly      = 0,  ///< Client will only read and expects others will only read.
williamr@2
    66
		EContentShareReadWrite     = 1,  ///< Client expects to read and write and others will read and write
williamr@2
    67
		EContentShareExclusive     = 2   ///< Client will have exclusive access to the file. This can only be used for unprotected content
williamr@2
    68
		};
williamr@2
    69
		
williamr@2
    70
	/**
williamr@2
    71
	 * Set of valid reader intents when opening content.
williamr@2
    72
	 * Remember to update any DRM agents if new values are added here.
williamr@2
    73
	 */
williamr@2
    74
	enum TIntent
williamr@2
    75
		{
williamr@2
    76
		EPeek		= 0,	///< Reader intends to peek at content.
williamr@2
    77
		EPlay		= 1,	///< Reader intends to play content.
williamr@2
    78
		EView		= 2,	///< Reader intends to view content.
williamr@2
    79
		EExecute	= 3,	///< Reader intends to execute content.
williamr@2
    80
		EPrint		= 4,	///< Reader intends to print content.
williamr@2
    81
		EPause		= 5,	///< Reader pauses play operation
williamr@2
    82
		EContinue	= 6,	///< Reader continues play operation after a pause operation
williamr@2
    83
		EStop		= 7,	///< Reader stops play operation.
williamr@2
    84
		EUnknown    = 8,    ///< Reader is uncertain of how the content will be used. Permits free access to unprotected data but prevents access to protected content
williamr@2
    85
		EInstall	= 9		///< Reader intends to install content.
williamr@2
    86
		};
williamr@2
    87
williamr@2
    88
williamr@2
    89
	/**
williamr@2
    90
	 * Defines the types of output file produced when importing files
williamr@2
    91
	 * into the Content Access Famework using CImportFile
williamr@2
    92
	 * Remember to update any DRM agents if new values are added here.
williamr@2
    93
	 */
williamr@2
    94
	enum TOutputType
williamr@2
    95
		{
williamr@2
    96
		EContent					= 0,	///< Content file produced
williamr@2
    97
		EReceipt					= 1     ///< Receipt for rights produced
williamr@2
    98
		}; 
williamr@2
    99
williamr@2
   100
	/**
williamr@2
   101
	 The agent status codes reported when importing a file with the supplier API
williamr@2
   102
	 Remember to update any DRM agents if new values are added here.
williamr@2
   103
	 */
williamr@2
   104
	enum TImportStatus 
williamr@2
   105
		{
williamr@2
   106
		EInProgress,				///< The import operation is proceeding with no error
williamr@2
   107
		EWaitingForNewOutputFile,	///< The agent is waiting for the client application to provide a new output file by calling ContinueWithNewOutputFile()
williamr@2
   108
		EComplete,					///< The import operation is complete
williamr@2
   109
		EFailed,					///< The import was aborted by the agent 
williamr@2
   110
		EUnsupportedMedia			///< The mime-type of the content is not supported on this device
williamr@2
   111
		};
williamr@2
   112
williamr@2
   113
	/** 
williamr@2
   114
	The list of generic content object attributes. Each of these attributes has a 
williamr@2
   115
	value that is either ETrue or EFalse unless otherwise specified
williamr@2
   116
	Remember to update any DRM agents if new values are added here.
williamr@2
   117
williamr@2
   118
	@li ETrue If an attribute is true
williamr@2
   119
	@li EFalse If the attribute is false
williamr@2
   120
	*/
williamr@2
   121
	enum TAttribute
williamr@2
   122
			{
williamr@2
   123
			EIsProtected				= 0, ///< Content object is protected
williamr@2
   124
			EIsForwardable				= 1, ///< Content object can be forwarded to another device or copied to removable media
williamr@2
   125
			EIsModifyable				= 2, ///< The content can be modified
williamr@2
   126
			EIsCopyable					= 3, ///< The content object can be duplicated in internal storage
williamr@2
   127
			ECanPlay					= 4, ///< Rights exist allowing the content to be played
williamr@2
   128
			ECanPrint					= 5, ///< Rights exist allowing the content to be printed
williamr@2
   129
			ECanExecute					= 6, ///< Rights exist allowing the content to be executed
williamr@2
   130
			ECanView					= 7, ///< Rights exist allowing the content to be viewed on screen
williamr@2
   131
			ERightsNone					= 8, ///< No rights exist for the content object
williamr@2
   132
			ERightsPending				= 9, ///< Rights are expected to arrive soon
williamr@2
   133
			ERightsHaveExpired			= 10, ///< Rights were were present but have since expired or been consumed
williamr@2
   134
			EPreviewAvailable			= 11, ///< A preview URI is available
williamr@2
   135
			EContentCDataInUse			= 12, ///< Set if the content is currently being used by another CData session
williamr@2
   136
			ECanRewind					= 13, ///< Media can be rewound without decrementing rights
williamr@2
   137
			ECopyPaste					= 14, ///< can make copies via the clipboard
williamr@2
   138
			ERightsConsumable			= 15, ///< Rights are consumable. The are decremented whenever content is accessed (ie. play counts).
williamr@2
   139
			ERightsStateless			= 16, ///< Rights are stateless and the content can be used repeatedly until a condition expires (ie. expiry date)
williamr@2
   140
			ECanMove					= 17, ///< Content can be moved
williamr@2
   141
			ECanRename					= 18, ///< Content can be renamed
williamr@2
   142
			ECanAutomaticConsume		= 19, ///< Rights can be consumed automatically when the content object is used for say wallpaper
williamr@2
   143
			EContentVersion   			= 20, ///< Version identifying the incarnation of the content object 
williamr@2
   144
			EIsMediaPlayerOnly          = 21, ///< The content can only be accessed by a media player, and cannot be accessed on an automatic event (such as a ringtone)
williamr@2
   145
			EIsAutomatedUseOnly         = 22, ///< The content can only be used on automated events (such as ringtones), and cannot be accessed manually from media players
williamr@2
   146
			ETrackNumber			    = 23, ///< Track number of the content in a collection (e.g. a track number in a music album)
williamr@2
   147
			EAgentSpecificAttributeBase	= 32768	///< Base index the agents should use when implementing new agent specific attributes
williamr@2
   148
			};
williamr@2
   149
williamr@2
   150
williamr@2
   151
		
williamr@2
   152
		/**  The list of generic string attributes. Each of these attributes 
williamr@2
   153
		has a value that is returned to the client as a string.
williamr@2
   154
		Remember to update any DRM agents if new values are added here.
williamr@2
   155
		*/
williamr@2
   156
		enum TStringAttribute
williamr@2
   157
			{
williamr@2
   158
			EDescription				= 0,	///< Description of the embedded object
williamr@2
   159
			EMimeType					= 1,    ///< Mime type of the content object
williamr@2
   160
			ETitle						= 2,    ///< Title of the object
williamr@2
   161
			EAuthor						= 3,	///< Author of the object
williamr@2
   162
			EIconURI					= 4,	///< Location of the icon for this content
williamr@2
   163
			EPreviewURI					= 5,	///< Location of a preview of the content
williamr@2
   164
			EContentURI					= 6,	///< URI where this content can be acquired from
williamr@2
   165
			EContentID					= 7,	///< Unique CID for this content
williamr@2
   166
			EInfoURL					= 8,	///< Location of further information about this content
williamr@2
   167
			EPendingRightsETA			= 9,	///< Expected number of seconds before the rights arrive
williamr@2
   168
			ETransactionID				= 10,	///< Transaction ID for content object. It may be used to track the content flow from one user to another one 
williamr@2
   169
			EContentLocation      		= 11, 	///< Location attribute of a content object. May be used as a reference for the object within the content file or as a filename for the object when exported
williamr@2
   170
			ERightsIssuerURI  			= 12,	///< URI where the rights for this content may be acquired from 
williamr@2
   171
			EGenre						= 13,   ///< Genre of the content
williamr@2
   172
			EUserRating					= 14,   ///< User rating of the content
williamr@2
   173
			EAuthoredDate				= 15,   ///< The Recording Year Date
williamr@2
   174
			ECoverURI					= 16,	///< Cover URI for the content
williamr@2
   175
			EAgentSpecificStringAttributeBase	= 32768 ///< Base index the agents should use when implementing new string attributes
williamr@2
   176
			};
williamr@2
   177
williamr@2
   178
		/** 
williamr@2
   179
		Events relating to DRM objects, powers of 2 so they can be OR'd
williamr@2
   180
		Remember to update any DRM agents if new values are added here.
williamr@2
   181
		*/
williamr@2
   182
		enum TEventMask
williamr@2
   183
			{
williamr@2
   184
			ERightsAvailable = 1,			///< Rights have arrived for the content object
williamr@2
   185
			ERightsExpired   = 2,			///< Rights have expired or have been exhausted
williamr@2
   186
			EAgentSpecificEventBase = 1023  ///< Base index for agent-specific events
williamr@2
   187
			};
williamr@2
   188
		/** 
williamr@2
   189
		The type of object inside a DRM file
williamr@2
   190
		Remember to update any DRM agents if new values are added here.
williamr@2
   191
		*/
williamr@2
   192
		enum TEmbeddedType 
williamr@2
   193
			{
williamr@2
   194
			EContainerObject		= 0,	///< A container object
williamr@2
   195
			EContentObject			= 1,	///< A content object
williamr@2
   196
			EAgentSpecificObject	= 2	    ///< An agent specific object
williamr@2
   197
			};
williamr@2
   198
williamr@2
   199
		/** Type of information to display
williamr@2
   200
			Remember to update any DRM agents if new values are added here.
williamr@2
   201
		 */
williamr@2
   202
		enum TDisplayInfo
williamr@2
   203
			{	
williamr@2
   204
			EFileProperties			= 0,	///< Display file name, last modified date etc
williamr@2
   205
			EFileAndRights			= 1,	///< Display file information and DRM rights information
williamr@2
   206
			ERights					= 2		///< Display DRM rights information only
williamr@2
   207
			};
williamr@2
   208
williamr@2
   209
		/** The type of rights object
williamr@2
   210
williamr@2
   211
		A rights object can be consumable and 
williamr@2
   212
		stateless so these can be OR'd together to form a bit mask
williamr@2
   213
		Remember to update any DRM agents if new values are added here.
williamr@2
   214
		*/
williamr@2
   215
		enum TRightsTypeMask
williamr@2
   216
			{	
williamr@2
   217
			ERightsTypeConsumable		= 1,    ///< Rights are consumable. The are decremented whenever content is accessed (ie. play counts).
williamr@2
   218
			ERightsTypeStateless		= 2		///< Rights are stateless and the content can be used repeatedly until a condition expires (ie. expiry date)
williamr@2
   219
			};
williamr@2
   220
		
williamr@2
   221
		/** State of a rights object
williamr@2
   222
		Remember to update any DRM agents if new values are added here.
williamr@2
   223
		*/
williamr@2
   224
		enum TRightsStatus
williamr@2
   225
			{	
williamr@2
   226
			ERightsStatusNone				= 0,    ///< Rights do not exist
williamr@2
   227
			ERightsStatusValid				= 1,	///< Rights are valid, ready to use
williamr@2
   228
			ERightsStatusExpired			= 2,	///< Rights have all expired
williamr@2
   229
			ERightsStatusPending			= 3		///< Rights are expected soon
williamr@2
   230
			};
williamr@2
   231
williamr@2
   232
	/** The Unique Id that identifies the default content object within any file
williamr@2
   233
	*/
williamr@2
   234
	_LIT(KDefaultContentObject,"DEFAULT");
williamr@2
   235
williamr@2
   236
	/** Defines the properties that an application can set in an agent.
williamr@2
   237
	Remember to update any DRM agents if new values are added here.
williamr@2
   238
	*/
williamr@2
   239
	enum TAgentProperty
williamr@2
   240
		{
williamr@2
   241
		EAgentPropertyBufferSize				= 0,	///< Set the buffer size used by the agent when reading content. This can be used to optimise performance.
williamr@2
   242
		EAgentPropertyAgentUI					= 1,	///< Enable or disable the Agent's user interface for errors and confirmation requests. 0 = Disable Agent UI, 1 = Enable Agent UI
williamr@2
   243
		EAgentPropertyMultipleSequence			= 2		///< Communicates to the agent that a series of operations are to be performed as part of one larger operation. eg. deleting multiple files, the value should be set back to zero when the sequence is finished.  0 = Not performing a multiple sequence, 1 = performing a multiple sequence.
williamr@2
   244
		};
williamr@2
   245
williamr@2
   246
	/** Maximum length of a content or container unique id
williamr@2
   247
	*/
williamr@2
   248
	const TInt KMaxCafUniqueId = 1024;
williamr@2
   249
	
williamr@2
   250
	/** Maximum length of a content object name
williamr@2
   251
	*/
williamr@2
   252
	const TInt KMaxCafContentName = 1024;
williamr@2
   253
williamr@2
   254
	}
williamr@2
   255
williamr@2
   256
#endif // __CAF_H__
williamr@4
   257