aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Luc Lamadon <jean-luc.lamadon@nokia.com>2009-09-25 13:59:01 +0300
committerJean-Luc Lamadon <jean-luc.lamadon@nokia.com>2009-09-25 13:59:20 +0300
commite4968980260f94aae429ba8dfc87c38a706e41d9 (patch)
treed0666c3987dc3def1a2b4b4bd4e3d0d50392cd33
parent82b4f1463d7eaeb24616189eeaffc359b52fd9fa (diff)
Revert libcontextprovider C API change, remove const from 1st parameterrelease_0.3.6
in context_provider_install_group
-rw-r--r--libcontextprovider/src/contextc.cpp2
-rw-r--r--libcontextprovider/src/contextc.h2
-rw-r--r--libcontextprovider/unit-tests/contextc/contextcunittest.cpp19
3 files changed, 12 insertions, 11 deletions
diff --git a/libcontextprovider/src/contextc.cpp b/libcontextprovider/src/contextc.cpp
index 394eb361..d6573bf6 100644
--- a/libcontextprovider/src/contextc.cpp
+++ b/libcontextprovider/src/contextc.cpp
@@ -169,7 +169,7 @@ void context_provider_install_key (const char* key,
/// passed user data \a subscription_changed_cb_target when the status of the subscription changes --
/// when the first subscriber appears or the last subscriber disappears. The \a clear_values_on_subscribe
/// when enabled will automatically clear (set to null/undetermined) the group keys on first subscribe.
-void context_provider_install_group (const char** key_group,
+void context_provider_install_group (char** key_group,
int clear_values_on_subscribe,
ContextProviderSubscriptionChangedCallback subscription_changed_cb,
void* subscription_changed_cb_target)
diff --git a/libcontextprovider/src/contextc.h b/libcontextprovider/src/contextc.h
index e62212b5..461fcf61 100644
--- a/libcontextprovider/src/contextc.h
+++ b/libcontextprovider/src/contextc.h
@@ -45,7 +45,7 @@ context_provider_install_key (const char* key,
void* subscription_changed_cb_target);
void
-context_provider_install_group (const char** key_group,
+context_provider_install_group (char** key_group,
int clear_values_on_subscribe,
ContextProviderSubscriptionChangedCallback subscription_changed_cb,
void* subscription_changed_cb_target);
diff --git a/libcontextprovider/unit-tests/contextc/contextcunittest.cpp b/libcontextprovider/unit-tests/contextc/contextcunittest.cpp
index 63f04b3a..5f683382 100644
--- a/libcontextprovider/unit-tests/contextc/contextcunittest.cpp
+++ b/libcontextprovider/unit-tests/contextc/contextcunittest.cpp
@@ -248,11 +248,11 @@ void ContextCUnitTest::installKey()
void ContextCUnitTest::installGroup()
{
- const char *keys[3];
- keys[0] = "Location.Lat";
- keys[1] = "Location.Lon";
- keys[2] = NULL;
-
+ char *keys[] = {
+ "Location.Lat",
+ "Location.Lon",
+ NULL
+ };
context_provider_install_group(keys, 0, MagicCallback, this);
QVERIFY(keysList.contains("Location.Lat"));
QVERIFY(keysList.contains("Location.Lon"));
@@ -305,10 +305,11 @@ void ContextCUnitTest::clearKeyOnSubscribeKey()
void ContextCUnitTest::clearKeyOnSubscribeGroup()
{
- const char *keys[3];
- keys[0] = "Location.Lat";
- keys[1] = "Location.Lon";
- keys[2] = NULL;
+ char *keys[] = {
+ "Location.Lat",
+ "Location.Lon",
+ NULL
+ };
context_provider_install_group(keys, 1, MagicCallback, this);