Rename the class Json to avoid symbol conflicts with Jsoncpp
[platform/core/context/context-provider.git] / src / battery-stats / Querier.cpp
index f5ce03f..3f15adb 100644 (file)
@@ -36,7 +36,7 @@
 
 using namespace ctx;
 
-BatteryStatsQuerier::BatteryStatsQuerier(ContextProvider *provider, Json option) :
+BatteryStatsQuerier::BatteryStatsQuerier(ContextProvider *provider, CtxJson1 option) :
        __provider(provider),
        __option(option)
 {
@@ -99,20 +99,20 @@ void BatteryStatsQuerier::onInserted(unsigned int queryId, int error, int64_t ro
 {
 }
 
-void BatteryStatsQuerier::onExecuted(unsigned int queryId, int error, std::vector<Json>& records)
+void BatteryStatsQuerier::onExecuted(unsigned int queryId, int error, std::vector<CtxJson1>& records)
 {
-       Json response;
+       CtxJson1 response;
        __convertToResponse(records, response);
        __provider->replyToRead(__option, error, response);
 
        delete this;
 }
 
-void BatteryStatsQuerier::__convertToResponse(std::vector<Json> &sqlResult, Json &response)
+void BatteryStatsQuerier::__convertToResponse(std::vector<CtxJson1> &sqlResult, CtxJson1 &response)
 {
        response = "{\"" KEY_QUERY_RESULT "\":[]}";
 
-       for (Json& tuple : sqlResult) {
+       for (CtxJson1& tuple : sqlResult) {
                response.append(NULL, KEY_QUERY_RESULT, tuple);
        }
 }