mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/src/cgetobject.cpp
changeset 25 d881023c13eb
parent 0 a2952bb97e68
child 32 edd273b3192a
equal deleted inserted replaced
21:a05c44bc3c61 25:d881023c13eb
    14 * Description:  Implement the operation: GetObject
    14 * Description:  Implement the operation: GetObject
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 #include <mtp/mmtpdataproviderframework.h>
       
    20 #include <mtp/cmtpobjectmetadata.h>
       
    21 #include <mtp/cmtptypefile.h>
    19 #include <mtp/cmtptypefile.h>
    22 
    20 
    23 #include "cgetobject.h"
    21 #include "cgetobject.h"
    24 #include "mmmtpdplogger.h"
    22 #include "mmmtpdplogger.h"
    25 
    23 
    82 // Standard c++ constructor
    80 // Standard c++ constructor
    83 // -----------------------------------------------------------------------------
    81 // -----------------------------------------------------------------------------
    84 //
    82 //
    85 CGetObject::CGetObject( MMTPDataProviderFramework& aFramework,
    83 CGetObject::CGetObject( MMTPDataProviderFramework& aFramework,
    86     MMTPConnection& aConnection ) :
    84     MMTPConnection& aConnection ) :
    87     CRequestProcessor( aFramework,
    85         CRequestProcessor( aFramework,
    88         aConnection,
    86             aConnection,
    89         sizeof( KMTPGetObjectPolicy ) / sizeof( TMTPRequestElementInfo ),
    87             sizeof( KMTPGetObjectPolicy ) / sizeof( TMTPRequestElementInfo ),
    90         KMTPGetObjectPolicy ),
    88             KMTPGetObjectPolicy ),
    91     iFs( iFramework.Fs() ),
    89         iError( EMTPRespCodeOK )
    92     iError( EMTPRespCodeOK )
       
    93     {
    90     {
    94     PRINT( _L( "Operation: GetObject(0x1009)" ) );
    91     PRINT( _L( "Operation: GetObject(0x1009)" ) );
    95     }
    92     }
    96 
    93 
    97 // -----------------------------------------------------------------------------
    94 // -----------------------------------------------------------------------------
   139     PRINT( _L( "MM MTP => CGetObject::GetObjectL" ) );
   136     PRINT( _L( "MM MTP => CGetObject::GetObjectL" ) );
   140 
   137 
   141     // Create the file object
   138     // Create the file object
   142     delete iFileObject;
   139     delete iFileObject;
   143     iFileObject = NULL;
   140     iFileObject = NULL;
   144     iFileObject = CMTPTypeFile::NewL( iFs, aFileName, EFileRead  );
   141     iFileObject = CMTPTypeFile::NewL( iFramework.Fs(), aFileName, EFileRead  );
   145 
   142 
   146     PRINT( _L( "MM MTP <= CGetObject::GetObjectL" ) );
   143     PRINT( _L( "MM MTP <= CGetObject::GetObjectL" ) );
   147     }
   144     }
   148 
   145 
   149 // -----------------------------------------------------------------------------
   146 // -----------------------------------------------------------------------------