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