diff options
Diffstat (limited to 'src/poi-service')
4 files changed, 25 insertions, 25 deletions
diff --git a/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp b/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp index fcd00b2..a81d690 100644 --- a/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp +++ b/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp @@ -48,7 +48,7 @@ void sqlRequest::onError() } -vector<poi_category_common_t> sqlRequest::getAvailableCategories(POIServiceTypes::CategoryID &rootCategory) +vector<poi_category_common_t> sqlRequest::getAvailableCategories(CommonTypes::CategoryID &rootCategory) { std::string sqlQuery; //SQL request on database std::ostringstream strStream; //temporary stream used for transformation into string @@ -213,7 +213,7 @@ void sqlRequest::getAvailableArea() } } -sqlRequest::SQL_REQUEST_ERRORS sqlRequest::createCategory(POIServiceTypes::CAMCategory category, POIServiceTypes::CategoryID& unique_id) +sqlRequest::SQL_REQUEST_ERRORS sqlRequest::createCategory(POIServiceTypes::CAMCategory category, CommonTypes::CategoryID& unique_id) { sqlRequest::SQL_REQUEST_ERRORS ret; size_t index; @@ -459,7 +459,7 @@ sqlRequest::SQL_REQUEST_ERRORS sqlRequest::checkIfCategoryNameDoesntExist(std::s return ret; } -sqlRequest::SQL_REQUEST_ERRORS sqlRequest::checkIfCategoryExist(POIServiceTypes::CategoryID unique_id) +sqlRequest::SQL_REQUEST_ERRORS sqlRequest::checkIfCategoryExist(CommonTypes::CategoryID unique_id) { std::string sqlQuery; //SQL request on database vector<vector<string> > query_result; @@ -529,7 +529,7 @@ sqlRequest::SQL_REQUEST_ERRORS sqlRequest::checkIfPoiExist(POIServiceTypes::POI_ return ret; } -sqlRequest::SQL_REQUEST_ERRORS sqlRequest::removeCategory(POIServiceTypes::CategoryID unique_id) +sqlRequest::SQL_REQUEST_ERRORS sqlRequest::removeCategory(CommonTypes::CategoryID unique_id) { sqlRequest::SQL_REQUEST_ERRORS ret; std::string sqlQuery; //SQL request on database @@ -682,7 +682,7 @@ sqlRequest::SQL_REQUEST_ERRORS sqlRequest::getFreePoiId(POIServiceTypes::POI_ID return ret; } -sqlRequest::SQL_REQUEST_ERRORS sqlRequest::getFreeCategoryId(POIServiceTypes::CategoryID& unique_id) +sqlRequest::SQL_REQUEST_ERRORS sqlRequest::getFreeCategoryId(CommonTypes::CategoryID& unique_id) { sqlRequest::SQL_REQUEST_ERRORS ret; vector<vector<string> > query_result; @@ -838,7 +838,7 @@ sqlRequest::SQL_REQUEST_ERRORS sqlRequest::checkIfAttributeExist(POIServiceTypes return ret; } -sqlRequest::SQL_REQUEST_ERRORS sqlRequest::createPoi(POIServiceTypes::CategoryID categoryId, POIServiceTypes::PoiAddedDetails poi, POIServiceTypes::POI_ID &unique_id) +sqlRequest::SQL_REQUEST_ERRORS sqlRequest::createPoi(CommonTypes::CategoryID categoryId, POIServiceTypes::PoiAddedDetails poi, POIServiceTypes::POI_ID &unique_id) { sqlRequest::SQL_REQUEST_ERRORS ret; std::string sqlQuery; //SQL request on database @@ -1292,7 +1292,7 @@ void PoiManagerServerStub::getRootCategory(const std::shared_ptr<CommonAPI::Clie _reply(m_rootCategory); } -void PoiManagerServerStub::getParentCategories(const std::shared_ptr<CommonAPI::ClientId> _client, POIServiceTypes::CategoryID _category, getParentCategoriesReply_t _reply) +void PoiManagerServerStub::getParentCategories(const std::shared_ptr<CommonAPI::ClientId> _client, CommonTypes::CategoryID _category, getParentCategoriesReply_t _reply) { uint16_t index; POIServiceTypes::CategoryAndLevel categoryAndLevel; @@ -1308,7 +1308,7 @@ void PoiManagerServerStub::getParentCategories(const std::shared_ptr<CommonAPI:: _reply(categories); } -void PoiManagerServerStub::getChildrenCategories(const std::shared_ptr<CommonAPI::ClientId> _client, POIServiceTypes::CategoryID _category, getChildrenCategoriesReply_t _reply) +void PoiManagerServerStub::getChildrenCategories(const std::shared_ptr<CommonAPI::ClientId> _client, CommonTypes::CategoryID _category, getChildrenCategoriesReply_t _reply) { uint16_t index; POIServiceTypes::CategoryAndLevel categoryAndLevel; @@ -1326,7 +1326,7 @@ void PoiManagerServerStub::getChildrenCategories(const std::shared_ptr<CommonAPI void PoiManagerServerStub::createCategory(const std::shared_ptr<CommonAPI::ClientId> _client, POIServiceTypes::CAMCategory _category, createCategoryReply_t _reply) { - POIServiceTypes::CategoryID unique_id; + CommonTypes::CategoryID unique_id; mp_sqlRequest->createCategory(_category,unique_id); refreshCategoryList(); @@ -1334,7 +1334,7 @@ void PoiManagerServerStub::createCategory(const std::shared_ptr<CommonAPI::Clien _reply(unique_id); } -void PoiManagerServerStub::removeCategories(const std::shared_ptr<CommonAPI::ClientId> _client, std::vector< POIServiceTypes::CategoryID> _categories, removeCategoriesReply_t _reply) +void PoiManagerServerStub::removeCategories(const std::shared_ptr<CommonAPI::ClientId> _client, std::vector< CommonTypes::CategoryID> _categories, removeCategoriesReply_t _reply) { size_t index; @@ -1354,7 +1354,7 @@ void PoiManagerServerStub::removeCategories(const std::shared_ptr<CommonAPI::Cli } } -void PoiManagerServerStub::addPOIs(const std::shared_ptr<CommonAPI::ClientId> _client, POIServiceTypes::CategoryID _unique_id, std::vector< POIServiceTypes::PoiAddedDetails> _poiList, addPOIsReply_t _reply) +void PoiManagerServerStub::addPOIs(const std::shared_ptr<CommonAPI::ClientId> _client, CommonTypes::CategoryID _unique_id, std::vector< POIServiceTypes::PoiAddedDetails> _poiList, addPOIsReply_t _reply) { size_t index; std::vector<POIServiceTypes::POI_ID> addedPoiList; diff --git a/src/poi-service/poi-manager-server/poi-manager-server-stub.h b/src/poi-service/poi-manager-server/poi-manager-server-stub.h index 18e583a..e9758c3 100644 --- a/src/poi-service/poi-manager-server/poi-manager-server-stub.h +++ b/src/poi-service/poi-manager-server/poi-manager-server-stub.h @@ -84,10 +84,10 @@ public: sqlRequest(); ~sqlRequest(); SQL_REQUEST_ERRORS setDatabase(const char* poiDatabaseFileName); - vector<poi_category_common_t> getAvailableCategories(POIServiceTypes::CategoryID& rootCategory); - SQL_REQUEST_ERRORS createCategory(POIServiceTypes::CAMCategory category,POIServiceTypes::CategoryID& unique_id); - SQL_REQUEST_ERRORS removeCategory(POIServiceTypes::CategoryID unique_id); - SQL_REQUEST_ERRORS createPoi(POIServiceTypes::CategoryID categoryId, POIServiceTypes::PoiAddedDetails poi, POIServiceTypes::POI_ID& unique_id); + vector<poi_category_common_t> getAvailableCategories(CommonTypes::CategoryID& rootCategory); + SQL_REQUEST_ERRORS createCategory(POIServiceTypes::CAMCategory category,CommonTypes::CategoryID& unique_id); + SQL_REQUEST_ERRORS removeCategory(CommonTypes::CategoryID unique_id); + SQL_REQUEST_ERRORS createPoi(CommonTypes::CategoryID categoryId, POIServiceTypes::PoiAddedDetails poi, POIServiceTypes::POI_ID& unique_id); SQL_REQUEST_ERRORS removePoi(POIServiceTypes::POI_ID unique_id); SQL_REQUEST_ERRORS searchPoi(const string &categoryName, const string &search_string, NavigationTypes::Coordinate3D &left_bottom_location, NavigationTypes::Coordinate3D &right_top_location, std::vector<POIServiceTypes::POI_ID> &poi_id_list); @@ -164,7 +164,7 @@ private: SQL_REQUEST_ERRORS checkIfCategoryNameDoesntExist(std::string name); - SQL_REQUEST_ERRORS checkIfCategoryExist(POIServiceTypes::CategoryID unique_id); + SQL_REQUEST_ERRORS checkIfCategoryExist(CommonTypes::CategoryID unique_id); SQL_REQUEST_ERRORS checkIfAttributeExist(POIServiceTypes::AttributeID unique_id, string name); @@ -172,7 +172,7 @@ private: SQL_REQUEST_ERRORS getFreePoiId(POIServiceTypes::POI_ID &unique_id); - SQL_REQUEST_ERRORS getFreeCategoryId(POIServiceTypes::CategoryID &unique_id); + SQL_REQUEST_ERRORS getFreeCategoryId(CommonTypes::CategoryID &unique_id); SQL_REQUEST_ERRORS getFreeAttributeId(POIServiceTypes::AttributeID &unique_id); @@ -197,11 +197,11 @@ public: void getSupportedLocales(const std::shared_ptr<CommonAPI::ClientId> _client, getSupportedLocalesReply_t _reply); void getAvailableCategories(const std::shared_ptr<CommonAPI::ClientId> _client, getAvailableCategoriesReply_t _reply); void getRootCategory(const std::shared_ptr<CommonAPI::ClientId> _client, getRootCategoryReply_t _reply); - void getChildrenCategories(const std::shared_ptr<CommonAPI::ClientId> _client, POIServiceTypes::CategoryID _category, getChildrenCategoriesReply_t _reply); - void getParentCategories(const std::shared_ptr<CommonAPI::ClientId> _client, POIServiceTypes::CategoryID _category, getParentCategoriesReply_t _reply); + void getChildrenCategories(const std::shared_ptr<CommonAPI::ClientId> _client, CommonTypes::CategoryID _category, getChildrenCategoriesReply_t _reply); + void getParentCategories(const std::shared_ptr<CommonAPI::ClientId> _client, CommonTypes::CategoryID _category, getParentCategoriesReply_t _reply); void createCategory(const std::shared_ptr<CommonAPI::ClientId> _client, POIServiceTypes::CAMCategory _category, createCategoryReply_t _reply); - void removeCategories(const std::shared_ptr<CommonAPI::ClientId> _client, std::vector< POIServiceTypes::CategoryID> _categories, removeCategoriesReply_t _reply); - void addPOIs(const std::shared_ptr<CommonAPI::ClientId> _client, POIServiceTypes::CategoryID _unique_id, std::vector< POIServiceTypes::PoiAddedDetails> _poiList, addPOIsReply_t _reply); + void removeCategories(const std::shared_ptr<CommonAPI::ClientId> _client, std::vector< CommonTypes::CategoryID> _categories, removeCategoriesReply_t _reply); + void addPOIs(const std::shared_ptr<CommonAPI::ClientId> _client, CommonTypes::CategoryID _unique_id, std::vector< POIServiceTypes::PoiAddedDetails> _poiList, addPOIsReply_t _reply); void removePOIs(const std::shared_ptr<CommonAPI::ClientId> _client, std::vector< POIServiceTypes::POI_ID> _ids, removePOIsReply_t _reply); void poiSearchStarted(const std::shared_ptr<CommonAPI::ClientId> _client, ::org::genivi::navigation::NavigationTypes::Handle _poiSearchHandle, uint16_t _maxSize, ::org::genivi::navigation::NavigationTypes::Coordinate3D _location, std::vector< ::v0_1::org::genivi::navigation::poiservice::POIServiceTypes::CategoryAndRadius> _poiCategories, std::vector< ::v0_1::org::genivi::navigation::poiservice::POIServiceTypes::AttributeDetails> _poiAttributes, std::string _inputString, uint16_t _sortOption, poiSearchStartedReply_t _reply); void poiSearchCanceled(const std::shared_ptr<CommonAPI::ClientId> _client, ::org::genivi::navigation::NavigationTypes::Handle _poiSearchHandle, poiSearchCanceledReply_t _reply); @@ -219,7 +219,7 @@ private: uint16_t m_availableCategories; vector<poi_category_common_t> m_availableCategoryTable; - POIServiceTypes::CategoryID m_rootCategory; + CommonTypes::CategoryID m_rootCategory; NavigationTypes::Coordinate3D m_centerLocation; NavigationTypes::Handle m_search_handle; diff --git a/src/poi-service/poi-server/main.cpp b/src/poi-service/poi-server/main.cpp index fffae27..0b6725a 100644 --- a/src/poi-service/poi-server/main.cpp +++ b/src/poi-service/poi-server/main.cpp @@ -586,12 +586,12 @@ DBus_searchResultDetails::DBus_searchResultDetails_t poiContentAccessServer::Get return(m_poiDetailsTable.at(index)); } -uint16_t poiContentAccessServer::searchAroundALocation(DBus_geoCoordinate3D::geoCoordinate3D_t location,const std::string* inputString, uint16_t sortOption) +uint16_t poiContentAccessServer::searchAroundALocation(DBus_geoCoordinate3D::geoCoordinate3D_t location,const std::string* inputString, int32_t sortOption) { uint16_t maxSize; DBus_geoCoordinate3D loc; std::vector< attributeId_t > attributes; - uint16_t statusValue; + int32_t statusValue; uint16_t resultListSize; std::vector<poiId_t> poiList; uint16_t index; diff --git a/src/poi-service/poi-server/poi-server-class.h b/src/poi-service/poi-server/poi-server-class.h index 4e0146e..b954f14 100644 --- a/src/poi-service/poi-server/poi-server-class.h +++ b/src/poi-service/poi-server/poi-server-class.h @@ -162,7 +162,7 @@ public: void SetLocale(std::string languageCode, std::string countryCode, std::string scriptCode); - uint16_t searchAroundALocation(DBus_geoCoordinate3D::geoCoordinate3D_t location,const std::string* inputString, uint16_t sortOption); + uint16_t searchAroundALocation(DBus_geoCoordinate3D::geoCoordinate3D_t location, const std::string* inputString, int32_t sortOption); void SetPoiSearchHandle(handleId_t poiSearchHandle); |