diff options
author | <philippe colliot> | 2015-08-04 11:57:45 +0200 |
---|---|---|
committer | <philippe colliot> | 2015-08-04 11:57:45 +0200 |
commit | 86c047d1c415e506069e222f621e8c13735f9c20 (patch) | |
tree | 3e5e61c96f42e71b387bf97bee3e29b3a45b0282 /test/poi-service | |
parent | 7408b8e55d16d8fd81acaa4ce08420c34385ee15 (diff) | |
download | poi-service-86c047d1c415e506069e222f621e8c13735f9c20.tar.gz |
[POISERVICE] POI manager based on CommonAPI has been successfully tested
Diffstat (limited to 'test/poi-service')
-rw-r--r-- | test/poi-service/poi-manager-client/main.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/test/poi-service/poi-manager-client/main.cpp b/test/poi-service/poi-manager-client/main.cpp index 8a5acbc..7d33680 100644 --- a/test/poi-service/poi-manager-client/main.cpp +++ b/test/poi-service/poi-manager-client/main.cpp @@ -70,6 +70,8 @@ public: void POIRemoved(const std::vector< POIServiceTypes::POI_ID >& pois); + void SearchStatusChanged(const NavigationTypes::Handle &handle, const POIServiceTypes::SearchStatusState &searchStatusState, const std::vector<POIServiceTypes::POI_ID> &pois); + void connectPopupWindow(GtkWidget *window); void testCreateCategory(); @@ -278,11 +280,32 @@ void contentManager::POIRemoved(const std::vector<POIServiceTypes::POI_ID> &pois for(index=0;index<pois.size();index++) { - cout << "POI " << pois.at(index) << "removed" << endl; + cout << "POI " << pois.at(index) << " removed" << endl; } } +void contentManager::SearchStatusChanged(const NavigationTypes::Handle &handle, const POIServiceTypes::SearchStatusState &searchStatusState, const std::vector<POIServiceTypes::POI_ID> &pois) +{ + size_t index; + + if(handle == SEARCH_HANDLE) + { + cout << "Search state " << searchStatusState << endl; + if(searchStatusState == POIServiceTypes::SearchStatusState::FINISHED) + { + cout << "Result list size " << pois.size() << endl; + if(pois.size()>0) + { + for(index=0;index<pois.size();index++) + { + cout << "POI id " << pois.at(index) << endl; + } + } + } + } +} + void contentManager::connectPopupWindow(GtkWidget *window) { mp_popupWindow = window; @@ -616,6 +639,9 @@ int main(int argc , char** argv ) myProxy->getPOIRemovedEvent().subscribe([&](const std::vector< POIServiceTypes::POI_ID >& pois) { clientContentManager->POIRemoved(pois); }); + myProxy->getSearchStatusChangedEvent().subscribe([&](const NavigationTypes::Handle handle, const POIServiceTypes::SearchStatusState searchStatusState, const std::vector< POIServiceTypes::POI_ID >& pois ) { + clientContentManager->SearchStatusChanged(handle,searchStatusState,pois); + }); // Send a feedback to the user cout << "poi manager client started" << endl; |