mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csendobject.h
changeset 25 d881023c13eb
parent 0 a2952bb97e68
child 32 edd273b3192a
equal deleted inserted replaced
21:a05c44bc3c61 25:d881023c13eb
    38 */
    38 */
    39 class CSendObject : public CRequestProcessor
    39 class CSendObject : public CRequestProcessor
    40     {
    40     {
    41 public:
    41 public:
    42     /**
    42     /**
    43     * Destructor
    43     * Two-phase construction method
    44     */
    44     * @param aFramework The data provider framework
    45     IMPORT_C virtual ~CSendObject();
    45     * @param aConnection The connection from which the request comes
    46 
    46     * @param aDpConfig Configuration of data provider
    47 protected:
    47     * @return The pointer to the created request processor object
    48     /**
    48     */
    49     * Standard C++ Constructor
    49     IMPORT_C static MMmRequestProcessor* NewL( MMTPDataProviderFramework& aFramework,
    50     * @param aFramework    The data provider framework
       
    51     * @param aConnection   The connection from which the request comes
       
    52     * @param aWrapper      Medadata access interface
       
    53     */
       
    54     IMPORT_C CSendObject( MMTPDataProviderFramework& aFramework,
       
    55         MMTPConnection& aConnection,
    50         MMTPConnection& aConnection,
    56         MMmMtpDpConfig& aDpConfig );
    51         MMmMtpDpConfig& aDpConfig );
    57 
    52 
    58     /**
    53     /**
       
    54     * Destructor
       
    55     */
       
    56     IMPORT_C virtual ~CSendObject();
       
    57 
       
    58 protected:
       
    59     /**
       
    60     * Standard C++ construction method
       
    61     * @param aFramework The data provider framework
       
    62     * @param aConnection The connection from which the request comes
       
    63     * @param aDpConfig Configuration of data provider
       
    64     * @return The pointer to the created request processor object
       
    65     */
       
    66     CSendObject( MMTPDataProviderFramework& aFramework,
       
    67         MMTPConnection& aConnection,
       
    68         MMmMtpDpConfig& aDpConfig );
       
    69 
       
    70     /**
    59     * 2nd Phase Constructor
    71     * 2nd Phase Constructor
    60     */
    72     */
    61     IMPORT_C void ConstructL();
    73     void ConstructL();
    62 
    74 
    63 protected:
    75 protected:
    64     // from CRequestProcessor
    76     // from CRequestProcessor
    65     /**
    77     /**
    66     * Override to match both the SendObjectInfo and SendObject requests
    78     * Override to match both the SendObjectInfo and SendObject requests
   102     /**
   114     /**
   103     * Override from CRequestProcessor, can not be neglected
   115     * Override from CRequestProcessor, can not be neglected
   104     */
   116     */
   105     IMPORT_C void UsbDisconnect();
   117     IMPORT_C void UsbDisconnect();
   106 
   118 
   107     // new protected function
       
   108     /**
       
   109      * Called by dp derived processor
       
   110      */
       
   111     IMPORT_C TMTPResponseCode SetMetaDataToWrapperL( const TUint16 aPropCode,
       
   112         MMTPType& aNewData,
       
   113         const CMTPObjectMetaData& aObjectMetaData );
       
   114 
       
   115 protected:
       
   116     // new virtual functions
       
   117     /**
       
   118      *
       
   119      */
       
   120     virtual TMTPResponseCode SetSpecificObjectPropertyL( TUint16 aPropCode,
       
   121         const CMTPObjectMetaData& aObject,
       
   122         const CMTPTypeObjectPropListElement& aElement ) = 0;
       
   123 
       
   124     /**
       
   125      * Check datatypes for DP specific PropCodes
       
   126      */
       
   127     virtual TMTPResponseCode CheckSepecificPropType( TUint16 aPropCode, TUint16 aDataType ) = 0;
       
   128 
       
   129     virtual TInt HandleSpecificWrapperError(TInt aError,
       
   130             const CMTPObjectMetaData& aObject) = 0;
       
   131 
       
   132 private:
   119 private:
   133     /**
   120     /**
   134     * Verify if the SendObject request comes after SendObjectInfo request
   121     * Verify if the SendObject request comes after SendObjectInfo request
   135     * @return EMTPRespCodeOK if SendObject request comes after a valid
   122     * @return EMTPRespCodeOK if SendObject request comes after a valid
   136     *     SendObjectInfo request, otherwise
   123     *     SendObjectInfo request, otherwise
   184     TMTPResponseCode ExtractPropertyL(const CMTPTypeObjectPropListElement& aElement);
   171     TMTPResponseCode ExtractPropertyL(const CMTPTypeObjectPropListElement& aElement);
   185 
   172 
   186     /*
   173     /*
   187      * Handle response phase of SetObjectPropListL operation
   174      * Handle response phase of SetObjectPropListL operation
   188      */
   175      */
   189     TMTPResponseCode SetObjectPropListL( const CMTPTypeObjectPropList& aPropList );
   176     TMTPResponseCode SetObjectPropListL();
   190 
   177 
   191     /**
   178     /**
   192      *
   179      *
   193      */
   180      */
   194     TMTPResponseCode MatchStoreAndParentL();
   181     TMTPResponseCode MatchStoreAndParentL();
   195 
   182 
   196     /**
   183     /**
   197     * Check if the object is too large
   184     * Check if the object is too large
   198     * @return ETrue if yes, otherwise EFalse
   185     * @return ETrue if yes, otherwise EFalse
   199     */
   186     */
   200     TBool IsTooLarge( TUint32 aObjectSize ) const;
   187     TBool IsTooLarge( TUint64 aObjectSize ) const;
   201 
   188 
   202     /**
   189     /**
   203     * Check if we can store the file on the storage
   190     * Check if we can store the file on the storage
   204     * @return ETrue if yes, otherwise EFalse
   191     * @return ETrue if yes, otherwise EFalse
   205     */
   192     */
   224     void ReserveObjectL();
   211     void ReserveObjectL();
   225 
   212 
   226     /**
   213     /**
   227     * Set protection status of object which could be read/write-only
   214     * Set protection status of object which could be read/write-only
   228     */
   215     */
   229     void SetProtectionStatusL();
   216     void SetProtectionStatus();
   230 
   217 
   231     /**
   218     /**
   232     * Save object information of object whose size is zero
   219     * Save object information of object whose size is zero
   233     */
   220     */
   234     void SaveEmptyFileL();
   221     void SaveEmptyFileL();
   297 
   284 
   298     TBool iNoRollback;
   285     TBool iNoRollback;
   299 
   286 
   300     TUint32 iPreviousTransactionID;
   287     TUint32 iPreviousTransactionID;
   301     TUint32 iPreviousOperation;
   288     TUint32 iPreviousOperation;
       
   289 
   302     };
   290     };
   303 
   291 
   304 #endif // CSENDOBJECT_H
   292 #endif // CSENDOBJECT_H