contentstorage/caclient/src/caservice.cpp
changeset 96 5d243a69bdda
parent 94 dbb8300717f7
child 98 d2f833ab7940
equal deleted inserted replaced
95:c739008478cc 96:5d243a69bdda
    28 #include "canotifier_p.h"
    28 #include "canotifier_p.h"
    29 #include "cadefs.h"
    29 #include "cadefs.h"
    30 
    30 
    31 #include "caclientproxy.h"
    31 #include "caclientproxy.h"
    32 #include "caclientnotifierproxy.h"
    32 #include "caclientnotifierproxy.h"
       
    33 #include "cahandlerproxy.h"
       
    34 #include "caqtsfhandlerloader.h"
    33 #include "caobjectadapter.h"
    35 #include "caobjectadapter.h"
    34 #include "caclienttest_global.h"
    36 #include "caclienttest_global.h"
    35 
    37 
    36 // ======== MEMBER FUNCTIONS ========
    38 // ======== MEMBER FUNCTIONS ========
    37 
    39 
    87  \param parent pointer to a parent. It defaults to NULL.
    89  \param parent pointer to a parent. It defaults to NULL.
    88  */
    90  */
    89 CaService::CaService(QObject *parent) :
    91 CaService::CaService(QObject *parent) :
    90     QObject(parent), m_d(new CaServicePrivate(this))
    92     QObject(parent), m_d(new CaServicePrivate(this))
    91 {
    93 {
    92 
       
    93 }
    94 }
    94 
    95 
    95 /*!
    96 /*!
    96  Returns a pointer to the instance of the CaService class.
    97  Returns a pointer to the instance of the CaService class.
    97  \retval A pointer to the instance of the CaService class.
    98  \retval A pointer to the instance of the CaService class.
   942 /*!
   943 /*!
   943  Constructor
   944  Constructor
   944  \param servicePublic pointer to public service
   945  \param servicePublic pointer to public service
   945  */
   946  */
   946 CaServicePrivate::CaServicePrivate(CaService *servicePublic) :
   947 CaServicePrivate::CaServicePrivate(CaService *servicePublic) :
   947     m_q(servicePublic), mProxy(new CaClientProxy), 
   948     m_q(servicePublic),
       
   949     mCommandHandler(new CaHandlerProxy(QSharedPointer<CaHandlerLoader>
       
   950         (new CaQtSfHandlerLoader()))),
       
   951     mProxy(new CaClientProxy()),
   948     mNotifierProxy(NULL)
   952     mNotifierProxy(NULL)
   949 {
   953 {
   950     const ErrorCode connectionResult = mProxy->connect();
   954     const ErrorCode connectionResult = mProxy->connect();
   951 
   955 
   952     USE_QWARNING_IF(connectionResult)
   956     USE_QWARNING_IF(connectionResult)
  1336 
  1340 
  1337     if (command == caCmdOpen) {
  1341     if (command == caCmdOpen) {
  1338         touch(entry);
  1342         touch(entry);
  1339     }
  1343     }
  1340 
  1344 
  1341     mErrorCode = mProxy->executeCommand(entry, command);
  1345     mErrorCode = mCommandHandler->execute(entry, command);
  1342 
  1346 
  1343     qDebug() << "CaServicePrivate::executeCommand mErrorCode on return:"
  1347     qDebug() << "CaServicePrivate::executeCommand mErrorCode on return:"
  1344              << mErrorCode;
  1348              << mErrorCode;
  1345 
  1349 
  1346     CACLIENTTEST_FUNC_EXIT("CaServicePrivate::executeCommand");
  1350     CACLIENTTEST_FUNC_EXIT("CaServicePrivate::executeCommand");