diff options
author | jk7744.park <jk7744.park@samsung.com> | 2015-10-24 16:45:43 +0900 |
---|---|---|
committer | jk7744.park <jk7744.park@samsung.com> | 2015-10-24 16:45:43 +0900 |
commit | 30aa89fe44757936f60148344791cecbc8e745f4 (patch) | |
tree | e28b9feead1d7b37a5923091c5917f0bee05eb6e /src/here/here_manager.h | |
parent | d790947a802824c442a22083376dc40a5c786f05 (diff) | |
download | maps-plugin-here-accepted/tizen/2.4/mobile/20151029.032842.tar.gz maps-plugin-here-accepted/tizen/2.4/mobile/20151029.032842.tar.bz2 maps-plugin-here-accepted/tizen/2.4/mobile/20151029.032842.zip |
tizen 2.4 releasetizen_2.4_mobile_releasesubmit/tizen_2.4/20151028.064257accepted/tizen/2.4/mobile/20151029.032842
Diffstat (limited to 'src/here/here_manager.h')
-rwxr-xr-x | src/here/here_manager.h | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/src/here/here_manager.h b/src/here/here_manager.h new file mode 100755 index 0000000..f68a5ea --- /dev/null +++ b/src/here/here_manager.h @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _LOCATION_HERE_MANAGER_H_ +#define _LOCATION_HERE_MANAGER_H_ + +//common header +#include <glib.h> +#include <stdio.h> +#include <stdlib.h> +#include <iostream> +#include <math.h> +#include <vector> + +//platform header +#include <net_connection.h> +#include <app_manager.h> + +//plug-in header +#include "here_base.h" +#include "here_api.h" +#include "here_types.h" +#include "here_utils.h" + +//map engine header +#include <common/ApplicationContext.h> +#include <common/HereConfig.h> + +HERE_PLUGIN_BEGIN_NAMESPACE + +class HereManager; + +typedef std::vector<HereBase*> HereSvcList; + +class HereManager +{ +public: + /** + *This is the default constructor for Geocoder. + */ + + HereManager(); + + /** + *This is the default destructor for Geocoder. + */ + + virtual ~HereManager(); + + enum HereSvcType { + HERE_SVC_GEOCODE, + HERE_SVC_REV_GEOCODE, + HERE_SVC_PLACE, + HERE_SVC_ROUTE + }; + + void* CreateInstance(HereSvcType nHereSvc, void* pCbFunc, void* pUserData, int *nReqId); + here_error_e CloseInstance(int nReqId); + here_error_e CancelInstance(int nReqId); + here_error_e SetCredentials(const char* provider_key); + here_error_e GetCredentials(char** provider_key); + void TerminateAllServices(void); + + here_error_e SetProxyAddress(); + here_error_e SetPreference(maps_preference_h hPref); + here_error_e GetPreference(maps_preference_h *hPref); + maps_preference_h GetPreference(); + + static bool Create(); + static HereManager* GetHandler(); + static void Close(); + +private: + here_error_e SetCredentials(); + static bool AppInfoMetadataCb(const char *metadata_key, const char *metadata_value, void *user_data); + static void NetworkStateChangedIndCb(connection_type_e type, void *user_data); + static here_error_e ConvertNetworkErrorCode(const int nErrorCode); + connection_h m_hConnection; + static int m_nRefCnt; + static HereManager *m_pHereManager; + +protected: + HereSvcList m_HereList; + gint m_nNextReqId; + maps_preference_h m_hPref; +}; + +HERE_PLUGIN_END_NAMESPACE + +#endif //_LOCATION_HERE_MANAGER_H_ |