sl@0
|
1 |
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// <hr>
|
sl@0
|
15 |
// The Content Access Framework provides a common interface for applications to access content.
|
sl@0
|
16 |
// In effect it behaves as a switch between different agents, known as Content Access Agents.
|
sl@0
|
17 |
// Each agent is an ECOM plugin, which implements the Content Access Agent interface <code>0x10204740</code>.
|
sl@0
|
18 |
// This interface should be a static function that creates and returns an instance of a class derived
|
sl@0
|
19 |
// from <code>ContentAccess::CAgentFactory</code> (e.g. <code>ContentAccess::CF32AgentFactory</code>).
|
sl@0
|
20 |
// <code>static CAgentFactory* AgentImplementationFunction();</code>
|
sl@0
|
21 |
// for reading unprotected content files. If no other agent recognizes a file the F32 agent will be used
|
sl@0
|
22 |
// to read it. In effect, this is the same as opening the file using an <code>RFile</code>, but allows the application
|
sl@0
|
23 |
// to use the same code to read protected and unprotected content.
|
sl@0
|
24 |
// The following diagram illustrates the implementation of CAF with two fictitious agents (OMA and MPEG).
|
sl@0
|
25 |
// <hr>
|
sl@0
|
26 |
// The problem with this implementation is that all three agents are loaded into the application's process space,
|
sl@0
|
27 |
// which represents a security risk. The application could potentially access the key used to decrypt protected
|
sl@0
|
28 |
// content.
|
sl@0
|
29 |
// A better solution is to implement the parts of the agent that require access to encryption/decryption keys or
|
sl@0
|
30 |
// rights in a separate server process. When platform security is enabled the server implementation also allows
|
sl@0
|
31 |
// the APIs to be policed by the agent server DLL to ensure only applcations with the right capabilities will
|
sl@0
|
32 |
// have access to the content.
|
sl@0
|
33 |
// To improve performance any functionality that does not require access to keys or rights should be implemented
|
sl@0
|
34 |
// in the client side DLL. Client side functionality reduces the number of context switches the processor needs
|
sl@0
|
35 |
// to perform resulting in improved performance from the agent.
|
sl@0
|
36 |
// There is no need to implement the F32 agent in a server process since it is only used to access unprotected content.
|
sl@0
|
37 |
// <hr>
|
sl@0
|
38 |
// The following guidelines are suggested for implementing Client/Server agents, but may not be appropriate
|
sl@0
|
39 |
// for all agents.
|
sl@0
|
40 |
// <b> Client Side Functionality </b>
|
sl@0
|
41 |
// - Implement the Content Access Agent ECOM interface
|
sl@0
|
42 |
// - Browse the contents of files
|
sl@0
|
43 |
// - Retrieve attributes or meta-data from a file
|
sl@0
|
44 |
// - All functions requiring the agent to display a user interface or dialog
|
sl@0
|
45 |
// - File recognition (for client applications and Apparc MIME types)
|
sl@0
|
46 |
// - Marshall calls to the server side
|
sl@0
|
47 |
// <b> Server Side Functionality </b>
|
sl@0
|
48 |
// - Content Encryption (protecting plaintext)
|
sl@0
|
49 |
// - Content Decryption (reading DRM content)
|
sl@0
|
50 |
// - Manage, protect and store Rights
|
sl@0
|
51 |
// - Any potentially destructive operation such as deleting content or rights
|
sl@0
|
52 |
// - Notifications
|
sl@0
|
53 |
// - Capability Enforcement
|
sl@0
|
54 |
// <hr>
|
sl@0
|
55 |
// The APIs provided in this document indicate the functions that are likely to require a client
|
sl@0
|
56 |
// process to have DRM capability in order to use the functionality. The client process will only
|
sl@0
|
57 |
// need DRM capability if it attempts to read DRM content using an CAF agent that implements a DRM
|
sl@0
|
58 |
// protection scheme.
|
sl@0
|
59 |
// The capability can only be enforced by the CAF agent running in a separate server process, so it is the responsibility
|
sl@0
|
60 |
// of the agent to ensure the client process has the required capabilities.
|
sl@0
|
61 |
// <b>There are no capabilities required to use unprotected content.</b>
|
sl@0
|
62 |
// <hr>
|
sl@0
|
63 |
// CAF is used to read unprotected or DRM protected content. It is a client side DLL that must be linked with
|
sl@0
|
64 |
// the process using CAF.
|
sl@0
|
65 |
// The agents may run in separate processes and will not have the correct capabilities to open files in TCB or
|
sl@0
|
66 |
// server private directories using just a file name. These files must be opened by the process that owns the
|
sl@0
|
67 |
// file and an open \c RFile handle passed to CAF in order to read them.
|
sl@0
|
68 |
// <hr>
|
sl@0
|
69 |
//
|
sl@0
|
70 |
//
|
sl@0
|
71 |
|
sl@0
|
72 |
/**
|
sl@0
|
73 |
@page CAFArchitecture Architecture
|
sl@0
|
74 |
- @ref ArchOverview
|
sl@0
|
75 |
- @ref CAFClientServer
|
sl@0
|
76 |
- @ref ClientServerImplementation
|
sl@0
|
77 |
- @ref CAFCapability
|
sl@0
|
78 |
- @ref UsingCAF
|
sl@0
|
79 |
@section ArchOverview Overview
|
sl@0
|
80 |
There is a special agent supplied by Symbian known as the @ref AboutF32Agent "F32Agent". This agent is used as a fallback
|
sl@0
|
81 |
@image html Architecture1.gif
|
sl@0
|
82 |
@section CAFClientServer Client / Server Agents
|
sl@0
|
83 |
@image html Architecture2.gif
|
sl@0
|
84 |
@section ClientServerImplementation Client / Server implementation guidelines
|
sl@0
|
85 |
@section CAFCapability DRM Capability
|
sl@0
|
86 |
@section UsingCAF Using CAF to read from other server private directories
|
sl@0
|
87 |
*/
|