mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cgetobjectpropdesc.h
changeset 0 a2952bb97e68
child 9 bee149131e4b
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Get object properties descript operation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CGETOBJECTPROPDESC_H
       
    20 #define CGETOBJECTPROPDESC_H
       
    21 
       
    22 #include "crequestprocessor.h"
       
    23 
       
    24 // forward declaration
       
    25 class CMTPTypeObjectPropDesc;
       
    26 class MMmMtpDpConfig;
       
    27 
       
    28 /**
       
    29 * Defines GetObjectPropDesc request processor for common
       
    30 */
       
    31 class CGetObjectPropDesc : public CRequestProcessor
       
    32     {
       
    33 public:
       
    34     /**
       
    35     * Destructor
       
    36     */
       
    37     IMPORT_C virtual ~CGetObjectPropDesc();
       
    38 
       
    39 protected:
       
    40     /**
       
    41     * Standard c++ constructor
       
    42     * @param aFramework    The data provider framework
       
    43     * @param aConnection   The connection from which the request comes
       
    44     * @param aWrapper      Medadata access interface
       
    45     */
       
    46     IMPORT_C CGetObjectPropDesc( MMTPDataProviderFramework& aFramework,
       
    47         MMTPConnection& aConnection,
       
    48         MMmMtpDpConfig& aDpConfig );
       
    49     
       
    50     /**
       
    51     * Second phase constructor
       
    52     */
       
    53     IMPORT_C void ConstructL();
       
    54 
       
    55 protected:
       
    56     //from CRequestProcessor
       
    57     /**
       
    58     * GetObjectPropDesc request handler
       
    59     */
       
    60     IMPORT_C void ServiceL();
       
    61 
       
    62     /**
       
    63     * Check the current request
       
    64     * @return EMTPRespCodeOK if the reqeust is good, otherwise,
       
    65     *     one of the error response codes
       
    66     */
       
    67     IMPORT_C TMTPResponseCode CheckRequestL();
       
    68 
       
    69 protected:
       
    70     // new virtuals
       
    71     virtual void ServiceSpecificObjectPropertyL( TUint16 aPropCode ) = 0;
       
    72 
       
    73 private:
       
    74     /**
       
    75     * Ensures the object format operation parameter is valid
       
    76     * (done for CheckRequestL)
       
    77     * @return Response code of the check result
       
    78     */
       
    79     TMTPResponseCode CheckFormatL() const;
       
    80 
       
    81     /**
       
    82     * Ensures the object prop code operation parameter is valid
       
    83     * (done for CheckRequestL)
       
    84     * @return Response code of the check
       
    85     */
       
    86     TMTPResponseCode CheckPropCodeL() const;
       
    87 
       
    88     /**
       
    89     * Create list of possible protection status and create new ObjectPropDesc
       
    90     */
       
    91     void ServiceProtectionStatusL();
       
    92 
       
    93     /**
       
    94     * Create Regular expression for a file name and create new ObjectPropDesc
       
    95     */
       
    96     void ServiceFileNameL();
       
    97 
       
    98     /**
       
    99     * Create list of possible nonConsumable values and create new ObjectPropDesc
       
   100     */
       
   101     void ServiceNonConsumableL();
       
   102 
       
   103     /*
       
   104      * Get group code according to property code
       
   105      * @param aPropCode Specify the property code of which the group code needed
       
   106      * @return Group code of specified property
       
   107      */
       
   108     TUint32 GetGroupCode( TUint16 aPropCode );
       
   109 
       
   110 
       
   111 protected:
       
   112     // Property object to return with the desc value
       
   113     CMTPTypeObjectPropDesc* iObjectProperty;
       
   114 
       
   115     //Format code
       
   116     TUint32 iFormatCode;
       
   117 
       
   118     MMmMtpDpConfig& iDpConfig;
       
   119     };
       
   120 
       
   121 #endif // CGETOBJECTPROPDESC_H