summaryrefslogtreecommitdiff
path: root/api/franca/navigation/src-gen/org/genivi/navigation/poiservice/POIContentManagerStubDefault.h
blob: 5008eed9eaf34da22a294251910f7c9242c494ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.core 2.1.6.v20140519.
* Used org.franca.core 0.8.11.201401091023.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at
* http://mozilla.org/MPL/2.0/.
*/
/**
 * This interface offers methods that implement the POI search functionality of a
 *  navigation system.
 */
#ifndef ORG_GENIVI_NAVIGATION_POISERVICE_POI_Content_Manager_STUB_DEFAULT_H_
#define ORG_GENIVI_NAVIGATION_POISERVICE_POI_Content_Manager_STUB_DEFAULT_H_


#include <org/genivi/navigation/poiservice/POIContentManagerStub.h>
#include <sstream>

namespace org {
namespace genivi {
namespace navigation {
namespace poiservice {

/**
 * Provides a default implementation for POIContentManagerStubRemoteEvent and
 * POIContentManagerStub. Method callbacks have an empty implementation,
 * remote set calls on attributes will always change the value of the attribute
 * to the one received.
 *
 * Override this stub if you only want to provide a subset of the functionality
 * that would be defined for this service, and/or if you do not need any non-default
 * behaviour.
 */
class POIContentManagerStubDefault : public virtual POIContentManagerStub {
public:
    POIContentManagerStubDefault();

    POIContentManagerStubRemoteEvent* initStubAdapter(const std::shared_ptr<POIContentManagerStubAdapter>& stubAdapter);

    const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> clientId);


    /**
     * This method returns the API version implemented by the content access module.
     */
    virtual void getVersion(const std::shared_ptr<CommonAPI::ClientId> clientId, NavigationTypes::Version& version);
    virtual void getVersion(NavigationTypes::Version& version);

    /**
     * Set the current language set for the search by poi provider module.
           
     *  The language defines the poi and categories name and details language. If the
     *  language is not supported, the default details will be returned in the native
     *  language.
     */
    virtual void setLocale(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string languageCode, std::string countryCode, std::string scriptCode);
    virtual void setLocale(std::string languageCode, std::string countryCode, std::string scriptCode);

    /**
     * Get the current language set for the search by poi provider module.
     */
    virtual void getLocale(const std::shared_ptr<CommonAPI::ClientId> clientId, std::string& languageCode, std::string& countryCode, std::string& scriptCode);
    virtual void getLocale(std::string& languageCode, std::string& countryCode, std::string& scriptCode);

    /**
     * Get the supported set of locales for the search by poi provider module.
     */
    virtual void getSupportedLocales(const std::shared_ptr<CommonAPI::ClientId> clientId, std::vector<POIServiceTypes::Locales>& localeList);
    virtual void getSupportedLocales(std::vector<POIServiceTypes::Locales>& localeList);

    /**
     * This method retrieves the list od POI categories available (pre-defined and
     *  custom).
     */
    virtual void getAvailableCategories(const std::shared_ptr<CommonAPI::ClientId> clientId, std::vector<POIServiceTypes::CategoryAndName>& categories);
    virtual void getAvailableCategories(std::vector<POIServiceTypes::CategoryAndName>& categories);

    /**
     * Get the root category id. That would be ALL_CATEGORIES.
     */
    virtual void getRootCategory(const std::shared_ptr<CommonAPI::ClientId> clientId, POIServiceTypes::CategoryID& category);
    virtual void getRootCategory(POIServiceTypes::CategoryID& category);

    /**
     * Get the children categories id and type (top level) from the a parent unique id.
     */
    virtual void getChildrenCategories(const std::shared_ptr<CommonAPI::ClientId> clientId, POIServiceTypes::CategoryID category, std::vector<POIServiceTypes::CategoryAndLevel>& categories);
    virtual void getChildrenCategories(POIServiceTypes::CategoryID category, std::vector<POIServiceTypes::CategoryAndLevel>& categories);

    /**
     * Get the parent categories id and type (top level) from the a unique id.
     */
    virtual void getParentCategories(const std::shared_ptr<CommonAPI::ClientId> clientId, POIServiceTypes::CategoryID category, std::vector<POIServiceTypes::CategoryAndLevel>& categories);
    virtual void getParentCategories(POIServiceTypes::CategoryID category, std::vector<POIServiceTypes::CategoryAndLevel>& categories);

    /**
     * Creates a category by name and return an unique id.
     */
    virtual void createCategory(const std::shared_ptr<CommonAPI::ClientId> clientId, POIServiceTypes::CAMCategory category, POIServiceTypes::CategoryID& unique_id);
    virtual void createCategory(POIServiceTypes::CAMCategory category, POIServiceTypes::CategoryID& unique_id);

    /**
     * Removes a list of categories. Because of required time to remove it from the
     *  database, a signal is emitted when the deletion is done.
     */
    virtual void removeCategories(const std::shared_ptr<CommonAPI::ClientId> clientId, std::vector<POIServiceTypes::CategoryID> categories);
    virtual void removeCategories(std::vector<POIServiceTypes::CategoryID> categories);

    /**
     * Adds a list of POIs to a category. Because of required time to add it to the
     *  database, a signal is emitted when the update is done, that gives the id of
     *  the elements added
     */
    virtual void addPOIs(const std::shared_ptr<CommonAPI::ClientId> clientId, POIServiceTypes::CategoryID unique_id, std::vector<POIServiceTypes::PoiAddedDetails> poiList);
    virtual void addPOIs(POIServiceTypes::CategoryID unique_id, std::vector<POIServiceTypes::PoiAddedDetails> poiList);

    /**
     * Removes a list of POIs to a category. Because of required time to remove it
     *  from the database, a signal is emitted when the update is done.
     */
    virtual void removePOIs(const std::shared_ptr<CommonAPI::ClientId> clientId, std::vector<POIServiceTypes::POI_ID> ids);
    virtual void removePOIs(std::vector<POIServiceTypes::POI_ID> ids);

    /**
     * This method is sent by the POI service component to inform all the CAM that a
     *  new POI search was started.
            It provides all the relevant search
     *  parameters. Of course the CAM will only be aware of the search if it registers
     *  one of the search categories.
     */
    virtual void poiSearchStarted(const std::shared_ptr<CommonAPI::ClientId> clientId, NavigationTypes::Handle poiSearchHandle, uint16_t maxSize, NavigationTypes::Coordinate3D location, std::vector<POIServiceTypes::CategoryAndRadius> poiCategories, std::vector<POIServiceTypes::AttributeDetails> poiAttributes, std::string inputString, uint16_t sortOption);
    virtual void poiSearchStarted(NavigationTypes::Handle poiSearchHandle, uint16_t maxSize, NavigationTypes::Coordinate3D location, std::vector<POIServiceTypes::CategoryAndRadius> poiCategories, std::vector<POIServiceTypes::AttributeDetails> poiAttributes, std::string inputString, uint16_t sortOption);

    /**
     * This method cancels the search for the current id.
     */
    virtual void poiSearchCanceled(const std::shared_ptr<CommonAPI::ClientId> clientId, NavigationTypes::Handle poiSearchHandle);
    virtual void poiSearchCanceled(NavigationTypes::Handle poiSearchHandle);

    /**
     * This method provides the poi results list found by the CAM.
            As the POI
     *  unique id is managed by the POI component, the CAM only provides the POI name,
     *  the category and coordinates as well as all the relevant detailed information.
     */
    virtual void resultListRequested(const std::shared_ptr<CommonAPI::ClientId> clientId, uint8_t camId, NavigationTypes::Handle poiSearchHandle, std::vector<POIServiceTypes::AttributeID> attributes, POIServiceTypes::SearchStatusState& statusValue, uint16_t& resultListSize, std::vector<POIServiceTypes::PoiCAMDetails>& resultList);
    virtual void resultListRequested(uint8_t camId, NavigationTypes::Handle poiSearchHandle, std::vector<POIServiceTypes::AttributeID> attributes, POIServiceTypes::SearchStatusState& statusValue, uint16_t& resultListSize, std::vector<POIServiceTypes::PoiCAMDetails>& resultList);

    /**
     * This method retrieves the details associated to one or more POI.
            It
     *  contains the name, the parent categories, the list of attributes, the icons,
     *  ... .
     */
    virtual void poiDetailsRequested(const std::shared_ptr<CommonAPI::ClientId> clientId, std::vector<POIServiceTypes::POI_ID> source_id, std::vector<POIServiceTypes::SearchResultDetails>& results);
    virtual void poiDetailsRequested(std::vector<POIServiceTypes::POI_ID> source_id, std::vector<POIServiceTypes::SearchResultDetails>& results);


    /**
     * guidanceStatusChanged = This signal is sent to the clients when one or more
     *  configuration settings changes.
     */
    virtual void fireConfigurationChangedEvent(const std::vector<uint16_t>& changedSettings);
    /**
     * CategoriesRemoved = This signal is emitted when a list of categories and
     *  associated content has been removed from the database.
     */
    virtual void fireCategoriesRemovedEvent(const std::vector<POIServiceTypes::CategoryID>& categories);
    /**
     * POIAdded = This signal is emitted when a list of POIs and associated content
     *  has been added to the database. It returns the ids.
     */
    virtual void firePOIAddedEvent(const std::vector<POIServiceTypes::POI_ID>& pois);
    /**
     * POIRemoved = This signal is emitted when a list of POIs and associated content
     *  has been removed from the database.
     */
    virtual void firePOIRemovedEvent(const std::vector<POIServiceTypes::POI_ID>& pois);


protected:
    class RemoteEventHandler: public virtual POIContentManagerStubRemoteEvent {
     public:
        RemoteEventHandler(POIContentManagerStubDefault* defaultStub);


     private:
        POIContentManagerStubDefault* defaultStub_;
    };
private:
    POIContentManagerStubDefault::RemoteEventHandler remoteEventHandler_;


    CommonAPI::Version interfaceVersion_;
};

} // namespace poiservice
} // namespace navigation
} // namespace genivi
} // namespace org

#endif // ORG_GENIVI_NAVIGATION_POISERVICE_POI_Content_Manager_STUB_DEFAULT_H_