mtpfws/mtpfw/dataproviders/dataproviderapi/interface/mtpdataproviderapitypes.h
changeset 0 d0791faffa3f
child 2 4843bb5893b6
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @publishedPartner
       
    19  @released
       
    20 */
       
    21 
       
    22 #ifndef MTPDATAPROVIDERAPITYPES_H
       
    23 #define MTPDATAPROVIDERAPITYPES_H
       
    24 
       
    25 #include <mtp/mtpdataproviderconfig.hrh>
       
    26 
       
    27 class MMTPConnection;
       
    28 
       
    29 /** 
       
    30 Defines the various data provider type categories.
       
    31 @publishedPartner
       
    32 @released
       
    33 */
       
    34 enum TMTPDataProviderTypes
       
    35     {
       
    36     /**
       
    37     ECOM plug-in.
       
    38     */
       
    39     EEcom   = KMTPDataProviderTypeECOM
       
    40     };
       
    41 
       
    42 /** 
       
    43 Defines the MTP framework operational modes.
       
    44 @publishedPartner
       
    45 @released
       
    46 */
       
    47 enum TMTPOperationalMode
       
    48     {
       
    49     /**
       
    50     Undefined mode.
       
    51     */
       
    52     EModeUnknown    = KMTPModeUnknown,
       
    53     
       
    54     /**
       
    55     MTP Mode.
       
    56     */
       
    57     EModeMTP        = KMTPModeMTP,
       
    58     
       
    59     /**
       
    60     PTP Mode.
       
    61     */
       
    62     EModePTP        = KMTPModePTP,
       
    63     
       
    64     /**
       
    65     PictBridge Mode.
       
    66     */
       
    67     EModePictBridge = KMTPModePictBridge,
       
    68     
       
    69 	};
       
    70 
       
    71 /** 
       
    72 Defines the MTP framework event notification types.
       
    73 @publishedPartner
       
    74 @released
       
    75 */
       
    76 enum TMTPNotification
       
    77     {
       
    78     /**
       
    79     This notification indicates that the operational mode of the MTP data 
       
    80     provider framework has changed. Details of the mode change are provided in
       
    81     the accompanying @see TMTPNotificationParamsSessionChange notification 
       
    82     parameter block.
       
    83     */
       
    84     EMTPModeChanged,
       
    85     
       
    86     /**
       
    87     This notification indicates that an active MTP session has become inactive. 
       
    88     Details of the session are provided in the accompanying 
       
    89     @see TMTPNotificationParamsSessionChange notification parameter block.
       
    90     */
       
    91     EMTPSessionClosed,
       
    92 
       
    93     /**
       
    94     This notification indicates that a new MTP session has become active. 
       
    95     Details of the session are provided in the accompanying 
       
    96     @see TMTPNotificationParamsSessionChange notification parameter block.
       
    97     */
       
    98     EMTPSessionOpened,
       
    99 
       
   100     /**
       
   101     This notification indicates that a new MTP storage has become available as
       
   102     a result of the insertion of removable storage media. 
       
   103     Details of the storage are provided in the accompanying 
       
   104     @see TMTPNotificationParamsStorageChange notification parameter block.
       
   105     */
       
   106     EMTPStorageAdded,
       
   107 
       
   108     /**
       
   109     This notification indicates that an MTP storage has become unavailable as
       
   110     a result of the removal of removable storage media. 
       
   111     Details of the storage are provided in the accompanying 
       
   112     @see TMTPNotificationParamsStorageChange notification parameter block.
       
   113     */
       
   114     EMTPStorageRemoved,
       
   115 	
       
   116 	/**
       
   117     This notification indicates that an MTP storage has become unavailable as
       
   118     a result of the usb cable removed. 
       
   119     Details of the storage are provided in the accompanying     
       
   120     */
       
   121 	EMTPDisconnected,
       
   122 	
       
   123 	/**
       
   124 	This notification indicates that an MTP Object has been Renamed.
       
   125 	*/
       
   126 	EMTPRenameObject,
       
   127 	
       
   128 	EMTPObjectAdded
       
   129     };
       
   130 
       
   131 /**
       
   132 Defines the notification parameter block which accompanies @see EMTPModeChanged 
       
   133 notifications.
       
   134 */
       
   135 class TMTPNotificationParamsModeChange
       
   136     {
       
   137 public:
       
   138 
       
   139     /**
       
   140     The new MTP operational mode TO which the MTP framework is 
       
   141     transitioning.
       
   142     */
       
   143     TMTPOperationalMode    iNewMode;
       
   144     
       
   145     /**
       
   146     The previous MTP operational mode FROM which the MTP framework is 
       
   147     transitioning.
       
   148     */
       
   149     TMTPOperationalMode    iPreviousMode;
       
   150     };
       
   151 
       
   152 /**
       
   153 Defines the notification parameter block which accompanies @see ESessionOpened 
       
   154 and @see ESessionClosed notifications.
       
   155 */
       
   156 class TMTPNotificationParamsSessionChange
       
   157     {
       
   158 public:
       
   159 
       
   160     /**
       
   161     The MTP connection assigned identifier of the session.
       
   162     */
       
   163     TUint           iMTPId;
       
   164 
       
   165     /**
       
   166     The MTP connection on which the exists.
       
   167     */
       
   168     MMTPConnection& iConnection;
       
   169     };
       
   170 
       
   171 /**
       
   172 Defines the notification parameter block which accompanies @see EStorageAdded 
       
   173 and @see EStorageRemoved notifications.
       
   174 */
       
   175 class TMTPNotificationParamsStorageChange
       
   176     {
       
   177 public:
       
   178 
       
   179     /**
       
   180     The MTP StorageID assigned to the storage.
       
   181     */
       
   182     TUint32 iStorageId;
       
   183     };
       
   184     
       
   185 /** 
       
   186 Defines the various data provider MTP feature support categories.
       
   187 @publishedPartner
       
   188 @released
       
   189 */
       
   190 enum TMTPSupportCategory
       
   191     {
       
   192     /**
       
   193     MTP association type datacodes.
       
   194     */
       
   195     EAssociationTypes       = 0,
       
   196     
       
   197     /**
       
   198     MTP device property identifier datacodes.
       
   199     */
       
   200     EDeviceProperties       = 1,
       
   201     
       
   202     /**
       
   203     MTP event identifier datacodes.
       
   204     */
       
   205     EEvents                 = 2,
       
   206 
       
   207     /**
       
   208     Produced MTP object format identifier datacodes.
       
   209     */
       
   210     EObjectCaptureFormats   = 3,
       
   211 
       
   212     /**
       
   213     Consumed MTP object format identifier datacodes.
       
   214     */
       
   215     EObjectPlaybackFormats  = 4,
       
   216     
       
   217     /**
       
   218     MTP object property identifier datacodes.
       
   219     */
       
   220     EObjectProperties       = 5,
       
   221 
       
   222     /**
       
   223     MTP operation identifier datacodes.
       
   224     */
       
   225     EOperations             = 6,  
       
   226     
       
   227     /**
       
   228     Supported storage systems (@see CMTPStorageMetaData::TStorageSystemType).
       
   229     */
       
   230     EStorageSystemTypes     = 7,
       
   231     
       
   232     /**
       
   233     MTP extension set identifier strings.
       
   234     */
       
   235     EVendorExtensionSets    = 8,
       
   236     
       
   237     /**
       
   238     Folder exclusion list strings
       
   239      */
       
   240     EFolderExclusionSets    = 9,
       
   241     
       
   242     /**
       
   243     Format code and file extension mapping strings
       
   244      */
       
   245     EFormatExtensionSets    = 10,
       
   246     
       
   247     /**
       
   248     MTP Device Service Extension service identifier strings.
       
   249     */
       
   250     EServiceIDs    = 11,
       
   251 
       
   252     /**
       
   253     The number of supported categories.
       
   254     */
       
   255     ENumCategories
       
   256     };
       
   257 
       
   258 /** 
       
   259 Defines the MTP operation transaction processing phases.
       
   260 @publishedPartner
       
   261 @released
       
   262 */
       
   263 enum TMTPTransactionPhase
       
   264 {
       
   265     /**
       
   266     Transaction phase unspecified.
       
   267     */
       
   268     EUndefined          = 0x00000000,
       
   269 	
       
   270     /**
       
   271     No MTP transaction is in-progress.
       
   272     */
       
   273 	EIdlePhase          = 0x00000001,
       
   274 	
       
   275     /**
       
   276     MTP request phase.
       
   277     */
       
   278     ERequestPhase       = 0x00000002,
       
   279 	
       
   280     /**
       
   281     MTP data phase (data flow direction is MTP initiator to MTP responder).
       
   282     */
       
   283     EDataIToRPhase      = 0x00000004,
       
   284 	
       
   285     /**
       
   286     MTP data phase (data flow direction is MTP responder to MTP initiator).
       
   287     */
       
   288     EDataRToIPhase      = 0x00000008,
       
   289 	
       
   290     /**
       
   291     MTP response phase.
       
   292     */
       
   293     EResponsePhase      = 0x00000010,
       
   294 	
       
   295     /**
       
   296     Transaction conmpleting phase.
       
   297     */
       
   298     ECompletingPhase    = 0x00000020
       
   299 };
       
   300 
       
   301 class TMTPNotificationParamsHandle
       
   302 {
       
   303 public:
       
   304 
       
   305 /**
       
   306 The MTP framework assigned Object Handle in the session.
       
   307 */
       
   308 TUint32           iHandleId;   
       
   309 /**
       
   310 The MTP framework assigned Object FileName in the session.
       
   311 */
       
   312 TFileName         iFileName;
       
   313 
       
   314 };
       
   315 
       
   316 #endif // MTPDATAPROVIDERAPITYPES_H