Disable my-place automation API 99/116899/1
authorMu-Woong Lee <muwoong.lee@samsung.com>
Thu, 2 Mar 2017 02:20:51 +0000 (11:20 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Thu, 2 Mar 2017 02:20:51 +0000 (11:20 +0900)
While refactoring the context fw for Tizen 4.0, my-place module will not be supported.

Change-Id: I9ee84c6cf2c22a03b0481fd2d99913fb0c6c43fd
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
src/context_places.cpp

index afef1d6..b4f266e 100644 (file)
  * limitations under the License.
  */
 
-#include <map>
+#include <tizen.h>
 #include <Json.h>
+#include <context_places_internal.h>
+#if 0
+#include <map>
 #include <MyPlaceTypes.h>
 #include <Types.h>
-#include <context_places_internal.h>
 #include "DBusClient.h"
+#endif
 
 /* XXX: temporary !!!!! Example JSON output:
 ---------------------------------------------------------------------------------------
@@ -103,8 +106,9 @@ struct _context_places_wifi_ap_list_handle_s {
        }
 };
 
-SO_EXPORT int context_places_get_list(context_places_list_h* list)
+EXPORT_API int context_places_get_list(context_places_list_h* list)
 {
+#if 0
        ASSERT_NOT_NULL(list);
        *list = NULL;
 
@@ -134,10 +138,13 @@ SO_EXPORT int context_places_get_list(context_places_list_h* list)
        (*list)->current = 0;
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_list_get_count(context_places_list_h list, int* count)
+EXPORT_API int context_places_list_get_count(context_places_list_h list, int* count)
 {
+#if 0
        ASSERT_NOT_NULL(list && count);
        *count = 0;
 
@@ -146,10 +153,13 @@ SO_EXPORT int context_places_list_get_count(context_places_list_h list, int* cou
        *count = result;
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_list_get_current(context_places_list_h list, context_places_place_h* record)
+EXPORT_API int context_places_list_get_current(context_places_list_h list, context_places_place_h* record)
 {
+#if 0
        ASSERT_NOT_NULL(list && record);
        *record = NULL;
 
@@ -165,19 +175,25 @@ SO_EXPORT int context_places_list_get_current(context_places_list_h list, contex
        (*record)->jPlace = tmp_record;
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_list_move_first(context_places_list_h list)
+EXPORT_API int context_places_list_move_first(context_places_list_h list)
 {
+#if 0
        ASSERT_NOT_NULL(list);
 
        list->current = 0;
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_list_move_next(context_places_list_h list)
+EXPORT_API int context_places_list_move_next(context_places_list_h list)
 {
+#if 0
        ASSERT_NOT_NULL(list);
 
        IF_FAIL_RETURN_TAG(
@@ -188,19 +204,25 @@ SO_EXPORT int context_places_list_move_next(context_places_list_h list)
        list->current++;
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_list_destroy(context_places_list_h list)
+EXPORT_API int context_places_list_destroy(context_places_list_h list)
 {
+#if 0
        ASSERT_NOT_NULL(list);
 
        delete list;
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_place_get_category(context_places_place_h place, context_places_categ_id_e* value, double* confidence)
+EXPORT_API int context_places_place_get_category(context_places_place_h place, context_places_categ_id_e* value, double* confidence)
 {
+#if 0
        ASSERT_NOT_NULL(place && value && confidence);
 
        int categId;
@@ -219,10 +241,13 @@ SO_EXPORT int context_places_place_get_category(context_places_place_h place, co
        *confidence = categConfidence;
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_place_get_name(context_places_place_h place, char** name)
+EXPORT_API int context_places_place_get_name(context_places_place_h place, char** name)
 {
+#if 0
        ASSERT_NOT_NULL(place && name);
 
        std::string str;
@@ -235,10 +260,13 @@ SO_EXPORT int context_places_place_get_name(context_places_place_h place, char**
        ASSERT_ALLOC(*name);
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_place_get_location(context_places_place_h place, double* latitude, double* longitude, double* accuracy)
+EXPORT_API int context_places_place_get_location(context_places_place_h place, double* latitude, double* longitude, double* accuracy)
 {
+#if 0
        ASSERT_NOT_NULL(place && latitude && longitude && accuracy);
 
        ctx::Json locationJson;
@@ -268,10 +296,13 @@ SO_EXPORT int context_places_place_get_location(context_places_place_h place, do
        *accuracy = acc;
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_place_get_creation_date(context_places_place_h place, time_t* timestamp)
+EXPORT_API int context_places_place_get_creation_date(context_places_place_h place, time_t* timestamp)
 {
+#if 0
        ASSERT_NOT_NULL(place && timestamp);
 
        int64_t tmp_timestamp;
@@ -283,19 +314,25 @@ SO_EXPORT int context_places_place_get_creation_date(context_places_place_h plac
        *timestamp = static_cast<time_t>(tmp_timestamp);
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_place_destroy(context_places_place_h place)
+EXPORT_API int context_places_place_destroy(context_places_place_h place)
 {
+#if 0
        ASSERT_NOT_NULL(place);
 
        delete place;
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_place_get_wifi_ap_list(context_places_place_h place, context_places_wifi_ap_list_h* list)
+EXPORT_API int context_places_place_get_wifi_ap_list(context_places_place_h place, context_places_wifi_ap_list_h* list)
 {
+#if 0
        ASSERT_NOT_NULL(place && list);
        *list = NULL;
 
@@ -316,10 +353,13 @@ SO_EXPORT int context_places_place_get_wifi_ap_list(context_places_place_h place
        (*list)->current = 0;
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_wifi_ap_list_get_count(context_places_wifi_ap_list_h list, int* count)
+EXPORT_API int context_places_wifi_ap_list_get_count(context_places_wifi_ap_list_h list, int* count)
 {
+#if 0
        ASSERT_NOT_NULL(list && count);
        *count = 0;
 
@@ -329,10 +369,13 @@ SO_EXPORT int context_places_wifi_ap_list_get_count(context_places_wifi_ap_list_
        *count = result;
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_wifi_ap_list_get_current(context_places_wifi_ap_list_h list, char** bssid, char** essid)
+EXPORT_API int context_places_wifi_ap_list_get_current(context_places_wifi_ap_list_h list, char** bssid, char** essid)
 {
+#if 0
        ASSERT_NOT_NULL(list && bssid && essid);
 
        ctx::Json wifiAPJson;
@@ -360,19 +403,25 @@ SO_EXPORT int context_places_wifi_ap_list_get_current(context_places_wifi_ap_lis
        ASSERT_ALLOC(*essid);
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_wifi_ap_list_move_first(context_places_wifi_ap_list_h list)
+EXPORT_API int context_places_wifi_ap_list_move_first(context_places_wifi_ap_list_h list)
 {
+#if 0
        ASSERT_NOT_NULL(list);
 
        list->current = 0;
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_wifi_ap_list_move_next(context_places_wifi_ap_list_h list)
+EXPORT_API int context_places_wifi_ap_list_move_next(context_places_wifi_ap_list_h list)
 {
+#if 0
        ASSERT_NOT_NULL(list);
 
        IF_FAIL_RETURN_TAG(
@@ -383,19 +432,25 @@ SO_EXPORT int context_places_wifi_ap_list_move_next(context_places_wifi_ap_list_
        list->current++;
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_wifi_ap_list_destroy(context_places_wifi_ap_list_h list)
+EXPORT_API int context_places_wifi_ap_list_destroy(context_places_wifi_ap_list_h list)
 {
+#if 0
        ASSERT_NOT_NULL(list);
 
        delete list;
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_is_supported(bool *supported)
+EXPORT_API int context_places_is_supported(bool *supported)
 {
+#if 0
        ctx::DBusClient dbusClient;
        int error = dbusClient.isSupported(PLACE_DETECTION_SUBJECT);
        if (error == ERR_NONE) {
@@ -409,10 +464,15 @@ SO_EXPORT int context_places_is_supported(bool *supported)
        }
        _D("");
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       if (supported)
+               *supported = false;
+       return TIZEN_ERROR_NONE;
 }
 
-SO_EXPORT int context_places_consent(bool consent)
+EXPORT_API int context_places_consent(bool consent)
 {
+#if 0
        _D("");
        ctx::Json option;
        option.set(NULL, PLACE_DETECTION_REQUEST_CONSENT, consent ? MYPLACE_SETTING_VALUE_TRUE : MYPLACE_SETTING_VALUE_FALSE);
@@ -424,10 +484,13 @@ SO_EXPORT int context_places_consent(bool consent)
                        _E, "Setting consent value failed");
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       return TIZEN_ERROR_NOT_SUPPORTED;
 }
 
-SO_EXPORT int context_places_is_consented(bool *consented)
+EXPORT_API int context_places_is_consented(bool *consented)
 {
+#if 0
        _D("");
        ctx::Json option;
        option.set(NULL, PLACE_DETECTION_REQUEST, PLACE_DETECTION_REQUEST_CONSENT);
@@ -455,4 +518,8 @@ SO_EXPORT int context_places_is_consented(bool *consented)
        }
 
        return CONTEXT_PLACES_ERROR_NONE;
+#endif
+       if (consented)
+               *consented = false;
+       return TIZEN_ERROR_NONE;
 }