Symbian3/PDK/Source/GUID-11761887-0C37-46E6-A7F6-E6F7FDE7C5A1.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 16 Jul 2010 17:23:46 +0100
changeset 12 80ef3a206772
parent 9 59758314f811
permissions -rw-r--r--
Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE task
  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-11761887-0C37-46E6-A7F6-E6F7FDE7C5A1" xml:lang="en"><title>Display
Information</title><abstract><p>CAF provides APIs that allow a client application to request
an agent to display information on the screen. Some agents may not support
these calls and leave with <codeph>KErrCANotSupported</codeph>.</p><p><note> Displaying
DRM rights information is only relevant for agents implementing a DRM scheme.
It is expected that an agent implementing DRM provides some or all of the
following functionality in the dialog: <ul>
<li id="GUID-7B16E603-A3B6-5556-AC9A-5D538F63F522"><p>Display all rights objects
including state (pending, valid, expired, orphaned and so on) </p> </li>
<li id="GUID-0B0F39BB-970A-5BDF-961C-2DF5CAB4BC29"><p>Display detailed information
on a particular rights object (play count, validity period, the related content
object(s)) </p> </li>
<li id="GUID-6088EBD3-21AD-5A5A-9A10-10BDD47956C8"><p>Allow unwanted, expired
or orphaned rights to be deleted. </p> </li>
</ul></note></p></abstract><prolog><metadata><keywords/></metadata></prolog><taskbody>
<prereq>       <p>The manager object must be created using the <xref href="GUID-7F3D9E35-A8FC-35A6-8036-23396BAADFDC.dita#GUID-7F3D9E35-A8FC-35A6-8036-23396BAADFDC/GUID-2F4CB027-777F-3F16-AE9A-8902F4AE87E7"><apiname>CManager::NewL()</apiname></xref> function. </p> 
   </prereq>
<context>       <p>Purpose of the task and when it should be carried out</p> 
   </context>
<steps id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-12-1-26-1-1-6-1-5-1-5-1-6-1-4-1-5-1-3-3">
<step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-12-1-26-1-1-6-1-5-1-5-1-6-1-4-1-5-1-3-3-1"><cmd>List the CAF agents.</cmd>
<info>           <p>Before working with one particular agent, the client needs
to find out which agents are installed on the device. The <xref href="GUID-7F3D9E35-A8FC-35A6-8036-23396BAADFDC.dita#GUID-7F3D9E35-A8FC-35A6-8036-23396BAADFDC/GUID-49BBD20E-5C75-3495-A789-854B14A2EFA4"><apiname>CManager::ListAgentsL()</apiname></xref> function
provides this list of agents. The F32Agent is not included in the list, as
it does not support any management functions. </p><p>The<xref href="GUID-0F5CE9B5-E674-3962-8376-CFB1ECB2F601.dita#GUID-0F5CE9B5-E674-3962-8376-CFB1ECB2F601/GUID-D510B56C-3060-3510-8EAA-7DCE30B33134"><apiname> ContentAccess::CAgent</apiname></xref> objects
in the list can be used to refer to the particular agent in subsequent function
calls.</p>         </info>
<stepxmp><codeblock xml:space="preserve">// Create a CManager object
CManager* manager = CManager::NewL();
RPointerArray &lt;CAgent&gt; theAgents;
// Get the list of agents 
manager-&gt;ListAgents(theAgents);
// Check there is at least one agent 
if(theAgents.Count() &gt; 0) 
		{
			// Find the first agent 
			CAgent&amp; agent = theAgents[0];
		}</codeblock></stepxmp>
</step>
<step id="GUID-9A1DEDD9-1DD5-4114-A6D5-ED6E80F1EF48"><cmd>Display file properties.</cmd>
<stepxmp><codeblock xml:space="preserve">
...
manager-&gt;DisplayInfoL(EFileProperties, avirtualPath);
...</codeblock></stepxmp>
</step>
<step id="GUID-E62C411C-2101-4775-AB02-52BE19A14915"><cmd>Display agent management
information.</cmd>
<info><p>The management API allows applications to request that an agent display
management information on the screen. The agent can present configuration
settings, status or DRM rights information. Each agent has the unique settings,
so it is not possible to display one dialog to configure all agents. </p><codeblock xml:space="preserve">RPointerArray &lt;CAgent&gt; theAgents;
// Get the list of agents 
manager-&gt;ListAgents(theAgents);
// Check there is at least one agent 
if(theAgents.Count() &gt; 0) 
		{
			CAgent&amp; agent = (*theAgents)[0];
			// Display the management information for the first agent
			manager-&gt;DisplayManagementInfoL(agent);
		}
</codeblock></info>
<info><p>It is possible that some agents do not support this capability and
leave with <codeph>KErrCANotSupported</codeph>. </p> </info>
</step>
</steps>
</taskbody><related-links>
<link href="GUID-E99E0092-5F1D-5715-945E-E83C307357C3.dita"><linktext>Managing
CAF Agents</linktext></link>
</related-links></task>