Display Information

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 KErrCANotSupported.

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:
  • Display all rights objects including state (pending, valid, expired, orphaned and so on)

  • Display detailed information on a particular rights object (play count, validity period, the related content object(s))

  • Allow unwanted, expired or orphaned rights to be deleted.

The manager object must be created using the CManager::NewL() function.

Purpose of the task and when it should be carried out

  1. List the CAF agents.

    Before working with one particular agent, the client needs to find out which agents are installed on the device. The CManager::ListAgentsL() function provides this list of agents. The F32Agent is not included in the list, as it does not support any management functions.

    The ContentAccess::CAgent objects in the list can be used to refer to the particular agent in subsequent function calls.

    // Create a CManager object
    CManager* manager = CManager::NewL();
    RPointerArray <CAgent> theAgents;
    // Get the list of agents 
    manager->ListAgents(theAgents);
    // Check there is at least one agent 
    if(theAgents.Count() > 0) 
    		{
    			// Find the first agent 
    			CAgent& agent = theAgents[0];
    		}
  2. Display file properties.
    ...
    manager->DisplayInfoL(EFileProperties, avirtualPath);
    ...
  3. Display agent management information.

    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.

    RPointerArray <CAgent> theAgents;
    // Get the list of agents 
    manager->ListAgents(theAgents);
    // Check there is at least one agent 
    if(theAgents.Count() > 0) 
    		{
    			CAgent& agent = (*theAgents)[0];
    			// Display the management information for the first agent
    			manager->DisplayManagementInfoL(agent);
    		}
    

    It is possible that some agents do not support this capability and leave with KErrCANotSupported.

Related concepts
Managing CAF Agents