javaextensions/midppush/pushregistryplugin/inc/pushregistryhandler.h
changeset 87 1627c337e51e
parent 21 2a9601315dfc
equal deleted inserted replaced
80:d6dafc5d983f 87:1627c337e51e
    61 
    61 
    62 using java::captain::uids_t;
    62 using java::captain::uids_t;
    63 
    63 
    64 /**
    64 /**
    65  * This class implements ExtensionPlugin interface of Java Manager.
    65  * This class implements ExtensionPlugin interface of Java Manager.
    66  * I.e. this class is starting point for all push related tasks in the
    66  * I.e. this class is a starting point for all push related tasks in the
    67  * Java Captain process.
    67  * Java Captain process.
    68  */
    68  */
    69 OS_NONSHARABLE_CLASS(PushRegistryHandler) : public java::captain::ExtensionPluginInterface,
    69 OS_NONSHARABLE_CLASS(PushRegistryHandler) : public java::captain::ExtensionPluginInterface,
    70         public java::comms::CommsListener,
    70         public java::comms::CommsListener,
    71         public java::captain::ApplicationRuntimeEventsInterface,
    71         public java::captain::ApplicationRuntimeEventsInterface,
   160     void readWStrArg(java::comms::CommsMessage& aMsg,const std::string& aMsgName,std::wstring& aUri);
   160     void readWStrArg(java::comms::CommsMessage& aMsg,const std::string& aMsgName,std::wstring& aUri);
   161     int readIntAsBooleanArg(java::comms::CommsMessage& aMsg,const std::string& aMsgName);
   161     int readIntAsBooleanArg(java::comms::CommsMessage& aMsg,const std::string& aMsgName);
   162     int readIntArg(java::comms::CommsMessage& aMsg,const std::string& aMsgName);
   162     int readIntArg(java::comms::CommsMessage& aMsg,const std::string& aMsgName);
   163     long long readLongLongArg(CommsMessage& aMsg,const std::string& aMsgName);
   163     long long readLongLongArg(CommsMessage& aMsg,const std::string& aMsgName);
   164 
   164 
       
   165     //Internal utility classes.
       
   166     
       
   167     /**
       
   168      * This "function object" class is used as an "comparison object"
       
   169      * when all driveInfo objects, which has equal root path, is removed from
       
   170      * mDriveInfo vector container. This wrapper class is needed because 
       
   171      * we did not wanted to add operator() method to fileutils::driveInfo struct.
       
   172      */
       
   173     class DriveInfoComparisonUtil
       
   174     {
       
   175         public:
       
   176         DriveInfoComparisonUtil(const java::fileutils::driveInfo& aInfo)
       
   177         : mObj(aInfo) {}
       
   178         
       
   179         ~DriveInfoComparisonUtil(){}
       
   180         
       
   181         DriveInfoComparisonUtil(const DriveInfoComparisonUtil& x)
       
   182         :mObj(x.mObj){}
       
   183         
       
   184         bool operator()(const java::fileutils::driveInfo& x)
       
   185         {
       
   186             if (mObj.iRootPath == x.iRootPath)
       
   187                 return true;
       
   188             return false;
       
   189         }
       
   190         
       
   191         private:
       
   192         const java::fileutils::driveInfo& mObj;
       
   193         
       
   194         //Not implemented.
       
   195         DriveInfoComparisonUtil &operator=(const DriveInfoComparisonUtil& x);
       
   196     };
       
   197 
   165     //Not implemented.
   198     //Not implemented.
   166     PushRegistryHandler(const PushRegistryHandler &x);
   199     PushRegistryHandler(const PushRegistryHandler &x);
   167     PushRegistryHandler &operator=(const PushRegistryHandler &x);
   200     PushRegistryHandler &operator=(const PushRegistryHandler &x);
   168 };
   201 };
   169 
   202