File Data Provider Configuration Parameters

The File Data Provider plug-in can be configured using the MTP_FILEDP_CONFIG resource. MTP_FILEDP_CONFIG is then used as the opaque_resource within an MTP_DATA_PROVIDER resource. These resources are defined in mtpfiledp_config.rss as shown below. The file is compiled and exported as z:/resource/mtp/102827B0.rsc

Syntax

The configurable parameters are:

  • Object Enumeration Iteration Length: This parameter configures object store enumeration by specifying the maximum number of data objects to be enumerated on each iteration of the process. Its purpose is to ensure that reasonable active scheduler RunL durations are maintained.

  • File Format Exclusion List: This parameter specifies the set of Symbian file system file formats which are excluded from the object enumeration process.

  • Extension Map: This parameter specifies the set of the mapping file extensions for the file codes in the format_exclusion_list.

#include <ecom/registryinfo.rh>
#include <mtp/mtpdpinfo.rh>
#include "mtpfiledp_config.rh"

RESOURCE MTP_DATA_PROVIDER dpConfig
    {
    type = EMtpDataTypeEcom;
    major_version = 1;
    object_enumeration_persistent = 0;
    supported_modes = KMtpModeMTP;  
    server_name = "";
    server_image_name = "";
    opaque_resource = fileConfig;
    }

RESOURCE MTP_FILEDP_CONFIG fileConfig
    {
    enumeration_iteration_length = 32;
    format_exclusion_list = {
        // Association 
        0x3009  //mp3 code added to exclusion list, handled by Music Data Provider.
        };

    extension_map = {
   
   MTP_FILEDP_EXTENSION_MAP // mp3 added to extension map, handled by Music Data Provider.
   {
   file_extension = "mp3";
   mtp_object_format = 0x3009;
   },
   ...
        };
    }
...