mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/crequestprocessor.h
branchRCL_3
changeset 17 780c925249c1
parent 9 bee149131e4b
child 30 6f9f6e99a23e
equal deleted inserted replaced
15:d240f0a77280 17:780c925249c1
    17 
    17 
    18 
    18 
    19 #ifndef CREQUESTPROCESSOR_H
    19 #ifndef CREQUESTPROCESSOR_H
    20 #define CREQUESTPROCESSOR_H
    20 #define CREQUESTPROCESSOR_H
    21 
    21 
    22 #include <e32base.h>
    22 
       
    23 #include <mtp/tmtptypenull.h>
    23 #include <mtp/mtpdataproviderapitypes.h>
    24 #include <mtp/mtpdataproviderapitypes.h>
    24 #include <mtp/mtpprotocolconstants.h>
    25 #include <mtp/mtpprotocolconstants.h>
    25 #include <mtp/tmtptyperesponse.h>
    26 #include <mtp/tmtptyperesponse.h>
    26 #include <mtp/tmtptypenull.h>
    27 
       
    28 // for derived processors
       
    29 #include <mtp/mmtpdataproviderframework.h>
    27 
    30 
    28 #include "crequestchecker.h"
    31 #include "crequestchecker.h"
    29 
    32 
    30 class MMTPConnection;
    33 class MMTPConnection;
    31 class TMTPTypeRequest;
    34 class TMTPTypeRequest;
    32 class CMTPDataProviderPlugin;
       
    33 class MMTPDataProviderFramework;
    35 class MMTPDataProviderFramework;
    34 class TMTPTypeEvent;
    36 class TMTPTypeEvent;
    35 class CMTPObjectInfo;
    37 class CMTPObjectInfo;
    36 
    38 
    37 static const TInt KMmMtpRArrayGranularity = 2;
    39 const TInt KMmMtpRArrayGranularity = 2;
    38 
    40 
    39 /**
    41 /**
    40 * Defines a request processor interface
    42 * Defines a request processor interface
    41 */
    43 */
    42 class MMmRequestProcessor
    44 class MMmRequestProcessor
   109     };
   111     };
   110 
   112 
   111 /**
   113 /**
   112 * Defines a processor factory function pointer
   114 * Defines a processor factory function pointer
   113 */
   115 */
   114 typedef MMmRequestProcessor
   116 typedef MMmRequestProcessor* (*TMTPRequestProcessorCreateFunc)( MMTPDataProviderFramework& aFramework,
   115     * (*TMTPRequestProcessorCreateFunc)( MMTPDataProviderFramework& aFramework,
   117     MMTPConnection& aConnection );
   116         MMTPConnection& aConnection );
       
   117 
   118 
   118 /**
   119 /**
   119 * Defines an entry which maps from operation code to the request processor
   120 * Defines an entry which maps from operation code to the request processor
   120 */
   121 */
   121 typedef struct
   122 typedef struct
   241     * was sometimes invalid in session close phase, and getting session id from
   242     * was sometimes invalid in session close phase, and getting session id from
   242     * request would cause panic
   243     * request would cause panic
   243     * @return session id
   244     * @return session id
   244     */
   245     */
   245     IMPORT_C TUint32 SessionId();
   246     IMPORT_C TUint32 SessionId();
       
   247 
   246 protected:
   248 protected:
   247     // from CActive
   249     // from CActive
   248     /**
   250     /**
   249     * part of active object framework, provide default implementation
   251     * part of active object framework, provide default implementation
   250     */
   252     */
   259     * part of active object framework, provide default implementation
   261     * part of active object framework, provide default implementation
   260     */
   262     */
   261     IMPORT_C TInt RunError( TInt aError );
   263     IMPORT_C TInt RunError( TInt aError );
   262 
   264 
   263 protected:
   265 protected:
   264     //new virtuals
   266     // new virtuals
   265     /**
   267     /**
   266     * Handle the request phase of the current request
   268     * Handle the request phase of the current request
   267     * @return EFalse
   269     * @return EFalse
   268     */
   270     */
   269     IMPORT_C virtual TBool DoHandleRequestPhaseL();
   271     IMPORT_C virtual TBool DoHandleRequestPhaseL();