apply new appcontrol policy.
authordukan.kim <dukan.kim@samsung.com>
Wed, 10 Apr 2013 03:30:09 +0000 (12:30 +0900)
committerdukan.kim <dukan.kim@samsung.com>
Wed, 10 Apr 2013 03:30:09 +0000 (12:30 +0900)
Change-Id: Id31b007b51ad9853f42f38c78704c1dbf384a0dd
Signed-off-by: dukan.kim <dukan.kim@samsung.com>
src/setting-app-control/SettingAppControlDllEntry.cpp

index 52f1b73..c4c595b 100755 (executable)
@@ -131,7 +131,7 @@ StartAppControl(int req, const String& aId, const String& oId, const String* pUr
 
                msg.AddData(L"launch-type", L"visibility");
 
-               __processId = _AppControlManager::GetInstance()->Launch(msg, "ug-bluetooth-efl", APPSVC_OPERATION_VIEW, NULL, NULL, OnBluetoothAppControlResult, 0);
+               __processId = _AppControlManager::GetInstance()->Launch(msg, "ug-bluetooth-efl", "http://tizen.org/appcontrol/operation/configure/bluetooth/visibility", NULL, NULL, OnBluetoothAppControlResult, 0);
 
                SysTryReturnResult(NID_APP, __processId >= 0, E_SYSTEM, "StartAppControl: Launching Bluetooth Visiblity  AppControl is failed.");
                SysLog(NID_APP, "StartAppControl: Launching Bluetooth Visiblity AppControl succeeded.");
@@ -330,27 +330,25 @@ OnBluetoothAppControlResult(void* b, int requestCode, service_result_e res, void
                {
                        pResult->Add(new (std::nothrow) String(L"category"), new (std::nothrow) String(L"Bluetooth.Visibility"));
 
-                       const char* pBuf = appsvc_get_data(pBundle, "visibility");
+                       const char* pBuf = appsvc_get_data(pBundle, "http://tizen.org/appcontrol/data/bluetooth/visibility");
                        if (pBuf)
                        {
                                switch (*pBuf)
                                {
                                case '0':
-                                       pBuf = "Off";
+                                       pBuf = "off";
                                        break;
                                case '1':
-                               case '2':
-                               case '3':
-                                       pBuf = "TimeLimitedOn";
+                                       pBuf = "always";
                                        break;
-                               case '4':
-                                       pBuf = "AlwaysOn";
+                               case '2':
+                                       pBuf = "time_limited";
                                        break;
                                default:
-                                       pBuf = "Off";
+                                       pBuf = "off";
                                        break;
                                }
-                               pResult->Add(new (std::nothrow) String(L"visibility"), new (std::nothrow) String(pBuf));
+                               pResult->Add(new (std::nothrow) String(L"http://tizen.org/appcontrol/data/bluetooth/visibility"), new (std::nothrow) String(pBuf));
                        }
                }
                break;