mtpdataproviders/mtppictbridgedp/inc/mtppictbridgedpconst.h
changeset 0 d0791faffa3f
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 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  @internalComponent
       
    19  */
       
    20 
       
    21 #ifndef MTPPICTBRIDGEDPCONST_H
       
    22 #define MTPPICTBRIDGEDPCONST_H
       
    23 
       
    24 #include <mtp/mtpprotocolconstants.h>
       
    25 #include <comms-infras/commsdebugutility.h>
       
    26 #include "mtpdpconst.h"
       
    27 
       
    28 
       
    29 _LIT(KDeviceDiscovery, "DDISCVRY.DPS"); 
       
    30 _LIT(KHostDiscovery, "HDISCVRY.DPS");
       
    31 _LIT(KHostRequest, "HREQUEST.DPS");
       
    32 _LIT(KHostResponse, "HRSPONSE.DPS");
       
    33 
       
    34 
       
    35 static const TUint KDiscoveryTime = 15 * 1000 * 1000; //15s 
       
    36 static const TUint KSendTimeout = 15* 1000 * 1000; // 15s
       
    37 
       
    38 
       
    39 /**
       
    40 define all the operations that are supported by the pictbridge data provider
       
    41 */
       
    42 static const TUint16 KMTPPictBridgeDpSupportedOperations[] = 
       
    43     {
       
    44     EMTPOpCodeGetObjectInfo,
       
    45 //    EMTPOpCodeGetObjectPropList,
       
    46     EMTPOpCodeGetObject,
       
    47 //    EMTPOpCodeSetObjectPropList,
       
    48     EMTPOpCodeSendObjectInfo,
       
    49 //    EMTPOpCodeSendObjectPropList,
       
    50     EMTPOpCodeSendObject
       
    51 //    EMTPOpCodeGetObjectPropsSupported,
       
    52 //    EMTPOpCodeGetObjectPropDesc,
       
    53 //    EMTPOpCodeGetFormatCapabilities,
       
    54 //    EMTPOpCodeDeleteObject
       
    55     };  
       
    56 
       
    57 /**
       
    58 define all the object properties that are supported by the pictbridge data provider
       
    59 */
       
    60 static const TUint16 KMTPPictBridgeDpSupportedProperties[] = 
       
    61     {
       
    62     EMTPObjectPropCodeStorageID,
       
    63     EMTPObjectPropCodeObjectFormat,
       
    64     EMTPObjectPropCodeProtectionStatus,
       
    65     EMTPObjectPropCodeObjectSize,
       
    66     EMTPObjectPropCodeObjectFileName,
       
    67     EMTPObjectPropCodeDateModified,
       
    68     EMTPObjectPropCodeParentObject,
       
    69     EMTPObjectPropCodePersistentUniqueObjectIdentifier,
       
    70     EMTPObjectPropCodeName,
       
    71     EMTPObjectPropCodeNonConsumable
       
    72     };
       
    73 
       
    74 static const TUint32 KPtpNoValue = 0x00;
       
    75 static const TInt KMTPProcessLimit = 1000; // how many entries processed before completing the ao
       
    76 static const TInt KExtensionBufferSize=5; //related to the size of strings in SMTPValidCodeExtensionMapping
       
    77 
       
    78 // extensions of image files that are shared via MTP PictBridge Data Provider
       
    79 
       
    80 struct SMTPValidCodeExtensionMapping
       
    81     {
       
    82     public:
       
    83     TMTPFormatCode iFormatCode;
       
    84     const TText*   iExtension;
       
    85     };
       
    86 
       
    87 // Note when adding extensions: 
       
    88 // same value for iExtension can be in the file only once, 
       
    89 // values for iFormatCode code can be multiple times
       
    90 
       
    91 #if defined(_UNICODE)
       
    92 #define CASTING(a) ((const TText*)L ## a)
       
    93 #else
       
    94 #define CASTING(a) ((const TText*)(a))
       
    95 #endif
       
    96 
       
    97 static const SMTPValidCodeExtensionMapping KMTPValidCodeExtensionMappings[] =
       
    98     {
       
    99         {EMTPFormatCodeScript, CASTING("dps")} // dps script
       
   100     };
       
   101 
       
   102 #endif // MTPPICTBRIDGEDPCONST_H
       
   103