The Device Data Provider implements a number of configurability parameters using the opaque_data field of the MTP_DATA_PROVIDER resource, and using the DRIVEARRAY resource found in the Device Data Provider’s configuration resource file.
Folder Exclusion List
This parameter specifies the set of Symbian file system folders that are excluded from the object enumeration process.
The parameter is specified as an array of strings that specifies an excluded folder. Each folder must be specified as a full path and can include a drive letter. If a drive letter is specified the folder path is excluded on the specified drive only. If a drive letter is not specified then the folder path is excluded on all available drives. Any backslash at the end is ignored.
The exclusion list does not prevent the root folder of a drive from getting specified (for example by specifying “K:”). If specified, Device Data Provider excludes all folders and data objects on the specified drive. To prevent objects being added to the device and then not being visible to the MTP Initiator that created them, any attempt by an MTP Initiator to write data (SendObject) to an excluded root folder will be rejected with an Access Denied MTP response code.
RESOURCE MTP_DATA_PROVIDER dpConfig { type = KMTPDataProviderTypeECOM; major_version = 1; object_enumeration_persistent = 0; supported_modes = KMTPModeMTP; server_name = ""; server_image_name = ""; opaque_resource = folderConfig; } RESOURCE MTP_DEVICEDP_CONFIG folderConfig { enumeration_iteration_length = 32; folder_exclusion_list = { "?:\\private", "?:\\resource", "?:\\sys", "?:\\system", "?:\\logs", "z:\\*", "Z:\\*" }; }
Drive List
This parameter list provides a mechanism to specify a friendly volume name and its root directory path for each drive (0 to 25, A to Z drive). For example, you can set the MMC card drive’s volume name to “E Drive ” or “MMC ”, etc and have E:\Media\ instead of E:\ as the drive’s root directory when MTP is accessing the drive.
You can specify friendly drive name and root directory name in DRIVEARRAY field of the mtpdevicedp_config.rss file.
/** * Update the drive number and provide the name that you wish to have. * Drive number varies from 0 to 25, '0' represent * A drive and '25' represent Z drive. * */ DRIVE { driveNo = 0; driveName = "A Drive"; rootDirPath = "\\"; },
Format Order List
This parameter list provides a mechanism to specify the order of the supported formats. For instance in a Data Provider supporting two formats ‘wma ’ and ‘mp3 ’, if you want mp3 to be ordered first then specify the order of format (mp3) first in FORMATS field of the mtpdevicedp_config.rss file.
/** *This resource used to create supported format ordered. */ RESOURCE FORMATSARRAY formats { //put the required format code in "" to enable format ordered property objFormats = {"3009", "B901"}; //MP3, WMA }
Extension Plug-in List
This parameter list provides a mechanism to extend device properties for Get/Set/Reset (for example Device Icon, Session initiator version info etc). Licensee can specify implementation UID for their own plug-ins (that has extenstion for any device property) in the EXTNPLUGINUIDS field of mtpdevicedp_config.rss file.
// This resource is used to load the extension device properties for Device data provider. RESOURCE PLUGINUIDARRAY extnpluginuids { //Put the extension plugin implementation UID in "" to load particular exn plugin // If more than one plugin is needed then seperate then by ',' //For example, "20010ADB" ,"20010ADC" uid_list = {"20010ADB"}; //For example, 20010ADB can be a UID for extending a reset plug-in. }
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.