mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetformatcapabilities.h
changeset 25 d881023c13eb
parent 0 a2952bb97e68
equal deleted inserted replaced
21:a05c44bc3c61 25:d881023c13eb
    18 #define CGETFORMATCAPABILITLIST_H
    18 #define CGETFORMATCAPABILITLIST_H
    19 
    19 
    20 #include <mtp/cmtptypeformatcapabilitylist.h>
    20 #include <mtp/cmtptypeformatcapabilitylist.h>
    21 
    21 
    22 #include "crequestprocessor.h"
    22 #include "crequestprocessor.h"
    23 #include "mmmtpdplogger.h"
       
    24 #include "mmmtpdpconfig.h"
       
    25 
    23 
    26 // forward declaration
    24 // forward declaration
    27 class MMTPRequestProcessor;
       
    28 class MMmMtpDpConfig;
    25 class MMmMtpDpConfig;
    29 class CMTPTypeObjectPropDesc;
    26 class CMTPTypeObjectPropDesc;
    30 class CMTPTypeInterdependentPropDesc;
       
    31 class CMTPTypeObjectPropDesc;
       
    32 class CMTPTypeString;
       
    33 
    27 
    34 /**
    28 /**
    35 Implements the file data provider CMTPGetFormatCapabilities request processor.
    29 Implements the file data provider CMTPGetFormatCapabilities request processor.
    36 @internalComponent
    30 @internalComponent
    37 */
    31 */
    38 class CGetFormatCapabilities : public CRequestProcessor
    32 class CGetFormatCapabilities : public CRequestProcessor
    39     {
    33     {
    40 public:
    34 public:
    41     /**
    35     /**
       
    36     * Two-phase construction method
       
    37     * @param aFramework The data provider framework
       
    38     * @param aConnection The connection from which the request comes
       
    39     * @param aDpConfig Configuration of data provider
       
    40     * @return The pointer to the created request processor object
       
    41     */
       
    42     IMPORT_C static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
       
    43         MMTPConnection& aConnection,
       
    44         MMmMtpDpConfig& aDpConfig );
       
    45 
       
    46     /**
    42     * Destructor
    47     * Destructor
    43     */
    48     */
    44     IMPORT_C virtual ~CGetFormatCapabilities();
    49     IMPORT_C virtual ~CGetFormatCapabilities();
    45 
    50 
    46 protected:
    51 private:
    47     /**
    52     /**
    48     * Standard c++ constructor
    53     * Standard c++ constructor
    49     * @param aFramework    The data provider framework
    54     * @param aFramework    The data provider framework
    50     * @param aConnection   The connection from which the request comes
    55     * @param aConnection   The connection from which the request comes
    51     * @param aDpConfig, The interface of dataprovider configuration
    56     * @param aDpConfig, The interface of dataprovider configuration
    52     */
    57     */
    53     IMPORT_C CGetFormatCapabilities( MMTPDataProviderFramework& aFramework,
    58     CGetFormatCapabilities( MMTPDataProviderFramework& aFramework,
    54         MMTPConnection& aConnection,
    59         MMTPConnection& aConnection,
    55         MMmMtpDpConfig& aDpConfig );
    60         MMmMtpDpConfig& aDpConfig );
    56 
    61 
    57     /**
    62     /**
    58     * Constructor
    63     * Constructor
    59     * Second phase constructor
    64     * Second phase constructor
    60     */
    65     */
    61     IMPORT_C void ConstructL();
    66     void ConstructL();
    62 
    67 
    63 protected:
    68 protected:
    64     // from CMTPRequestProcessor
    69     // from CMTPRequestProcessor
    65     /**
    70     /**
    66     * CGetFormatCapabilities request handler
    71     * CGetFormatCapabilities request handler
    72     * @return EMTPRespCodeOK if the reqeust is good, otherwise,
    77     * @return EMTPRespCodeOK if the reqeust is good, otherwise,
    73     *     one of the error response codes
    78     *     one of the error response codes
    74     */
    79     */
    75     IMPORT_C TMTPResponseCode CheckRequestL();
    80     IMPORT_C TMTPResponseCode CheckRequestL();
    76 
    81 
    77 protected:
    82 private:
    78     // new virtuals
       
    79     /**
    83     /**
    80     * Service specific object property
    84      * Handle one format's capabilities
    81     * @param aPropCode, The prop code
    85      */
    82     * @return MTPType object propdesc
    86     void ServiceOneFormatCapabilitiesL( TUint aFormatCode );
    83     */
       
    84     virtual CMTPTypeObjectPropDesc* ServiceSpecificPropertyDescL( TUint16 aPropCode ) = 0;
       
    85 
    87 
    86     /**
    88     /**
    87     * Service interdepent propdesc
    89     * Handle one property description of one format
    88     * @param aFormatCode, The format code
       
    89     * @return MTPTypeInterdependentPropDesc
       
    90     */
       
    91     virtual void ServiceInterdepentPropDescL() = 0;
       
    92 
       
    93 private:
       
    94     /**
       
    95     * Get  PropDesc via PropCode
       
    96     * @param aPropCode    The Property Code
    90     * @param aPropCode    The Property Code
    97     * @return The MTPTypeObject PropDesc
    91     * @return The MTPTypeObject PropDesc
    98     */
    92     */
    99     CMTPTypeObjectPropDesc* ServicePropDescL( TUint16 aPropCode );
    93     CMTPTypeObjectPropDesc* ServiceOnePropDescL( TUint16 aPropCode );
   100 
    94 
   101     /**
    95 private:
   102     * Get PropDesc with Protection status
       
   103     * @return The MTPTypeObject PropDesc
       
   104     */
       
   105     CMTPTypeObjectPropDesc*  ServiceProtectionStatusL();
       
   106 
       
   107     /**
       
   108     * Get PropDesc with file name
       
   109     * @return The MTPTypeObject PropDesc
       
   110     */
       
   111     CMTPTypeObjectPropDesc*  ServiceFileNameL();
       
   112 
       
   113     /**
       
   114     * Get PropDesc with nonconsumable
       
   115     * @return The MTPTypeObject PropDesc
       
   116     */
       
   117     CMTPTypeObjectPropDesc*  ServiceNonConsumableL();
       
   118 
       
   119     /**
       
   120     * Get group code
       
   121     * @param aPropCode Specify the property code of which the group code needed
       
   122     * @return Group code of specified property
       
   123     */
       
   124     TUint32 GetGroupCode( TUint32 aPropCode );
       
   125 
       
   126 protected:
       
   127     /*
    96     /*
   128      * Format code.
    97      * Format code.
   129      */
    98      */
   130     TUint iFormatCode;
    99     TUint iFormatCode;
   131 
   100 
   132     CMTPTypeInterdependentPropDesc* iInterdependentPropDesc;
   101     /*
       
   102      * MMmMtpDpConfig.
       
   103      */
       
   104     MMmMtpDpConfig& iDpConfig;
   133 
   105 
   134 private: // Owned
       
   135     /*
   106     /*
   136      * CMTPTypeCapabilityList dataset.
   107      * CMTPTypeCapabilityList dataset.
   137      */
   108      */
   138     CMTPTypeFormatCapabilityList* iCapabilityList;
   109     CMTPTypeFormatCapabilityList* iCapabilityList;
   139 
   110 
   140     /*
       
   141      * MMmMtpDpConfig.
       
   142      */
       
   143     MMmMtpDpConfig& iDpConfig;
       
   144     };
   111     };
   145 
   112 
   146 #endif // CMTPGETFORMATCAPABILITLIST_H
   113 #endif // CMTPGETFORMATCAPABILITLIST_H