int __groupItemCount[ID_GROUP_TOTAL_COUNT];
int __groupIndexTranslateTable[ID_TRANSLATE_TABLE_MAX];
bool __isVisibleGroupExpanded;
- bool __isAppControlRequest;
+ char __isAppControlRequest;
Tizen::Base::String __categoryCheck;
};
virtual ~FontForm(void);
void CreateFooter(void);
- void SetAppControlRequest(bool requestStatus);
- bool GetAppControlRequest(void);
+ void SetAppControlRequest(char requestStatus);
+ char GetAppControlRequest(void);
void AppControlFontResult(void);
result GetFontList(Tizen::Base::Collection::IList& list);
virtual result OnInitializing(void);
void GetTableViewItemString(int groupIndex, int itemIndex, Tizen::Base::String& firstLine, Tizen::Base::String& secondLine);
private:
- bool __isAppControlRequest;
+ char __isAppControlRequest;
Tizen::Base::String __categoryCheck;
Tizen::Base::Collection::ArrayList* __fontList;
bool __isFontTypeExpend;
virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
private:
- bool __isAppControlRequest;
+ char __isAppControlRequest;
Tizen::Base::String __categoryCheck;
};
const wchar_t* GroupPersonalSceneConnect(int viewMode, int itemIndex, Tizen::Ui::Controls::TableViewItemStatus status);
const wchar_t* GroupDeviceSceneConnect(int viewMode, int itemIndex, Tizen::Ui::Controls::TableViewItemStatus status);
const wchar_t* GroupSystemSceneConnect(int viewMode, int itemIndex, Tizen::Ui::Controls::TableViewItemStatus status);
- const wchar_t* GroupApplicationSceneConnect(int index);
private:
int __currentTableViewList;
Tizen::Base::Collection::IList* __pDownloadAppIdKeyList;
Tizen::Base::Collection::HashMap* __pAppIdHashMap;
Tizen::Base::Collection::HashMap* __pAppIconPathHashMap;
- Tizen::Ui::Controls::FooterItem __footerViewType;
Tizen::System::ISettingInfoSetValueAsyncResultListener* __pFlightModeSetValueAsyncResultListener;
};
extern const wchar_t* IDB_NETWORK;
extern const wchar_t* IDB_BLUETOOTH;
extern const wchar_t* IDB_WIFI_DIRECT;
+extern const wchar_t* IDB_NFC;
//System
extern const wchar_t* IDB_EVENT_NOTIFICATION;
extern const wchar_t* IDB_WALLPAPER;
+extern const wchar_t* IDB_LOCK_SCREEN;
extern const wchar_t* IDB_SOUND;
extern const wchar_t* IDB_BRIGHTNESS;
extern const wchar_t* IDB_SECURITY;
#define BLUETOOTH_TEST_CODE
+static const char APPCONTROL_REQUEST_DEFAULT = 0x00;
+static const char APPCONTROL_REQUEST_BLUETOOTH = 0x20;
+
static const int ID_BLUETOOTH_COUNT_DEFAULT = 1;
static const int ID_BLUETOOTH_TABLEVIEW_ITEM_SPECIFIED_INPUT_PARMETER = -1;
static const int ID_FOOTER_ITEM_INDEX_1 = 0;
, __pPendingEventReceivedForm(null)
, __pAnimationFrameList(null)
, __isVisibleGroupExpanded(false)
- , __isAppControlRequest(false)
+ , __isAppControlRequest(APPCONTROL_REQUEST_DEFAULT)
, __categoryCheck(L"")
{
InitStateChangedTabviewItemTag();
if (pArgs != null)
{
__categoryCheck = static_cast<String*>(pArgs->GetAt(0))->GetPointer();
- if (__categoryCheck == L"category:Bluetooth.Visibility")
+
+ if (__categoryCheck.CompareTo(L"http://tizen.org/appcontrol/data/bluetooth/visibility") == 0)
{
- __isAppControlRequest = true;
+ __isAppControlRequest = APPCONTROL_REQUEST_BLUETOOTH;
}
delete pArgs;
pArgs = null;
else if (pArgs != null)
{
__categoryCheck = static_cast<String*>(pArgs->GetAt(0))->GetPointer();
- if (__categoryCheck == L"category:Bluetooth.Visibility")
+
+ if (__categoryCheck.CompareTo(L"http://tizen.org/appcontrol/data/bluetooth/visibility") == 0)
{
- __isAppControlRequest = true;
+ __isAppControlRequest = APPCONTROL_REQUEST_BLUETOOTH;
}
delete pArgs;
pArgs = null;
__pBluetoothPresentationModelInstance->CancelBluetoothDiscovery();
}
- if (__isAppControlRequest == true)
+ if (__isAppControlRequest != APPCONTROL_REQUEST_DEFAULT)
{
UiApp* pApp = UiApp::GetInstance();
AppAssert(pApp);
HashMap* hashMap = new (std::nothrow) HashMap();
hashMap->Construct();
- if (__categoryCheck == L"category:Bluetooth.Visibility")
+ if (__isAppControlRequest & APPCONTROL_REQUEST_BLUETOOTH)
{
- SettingInfo::GetValue(SETTING_INFO_KEY_FONT_TYPE, value);
- hashMap->Add(*(new (std::nothrow) String(L"category")), *(new (std::nothrow) String(L"Bluetooth.Visibility")));
- hashMap->Add(*(new (std::nothrow) String(L"visibility")), *(new (std::nothrow) String(L"Off")));
+ hashMap->Add(*(new (std::nothrow) String(L"http://tizen.org/appcontrol/data/bluetooth/visibility")), *(new (std::nothrow) String(L"Off")));
}
-
pAppManager->SendAppControlResult(reqId, APP_CTRL_RESULT_SUCCEEDED, hashMap);
hashMap->RemoveAll();
using namespace Tizen::Ui::Controls;
using namespace Tizen::Ui::Scenes;
+static const char APPCONTROL_DEFAULT = 0x00;
+static const char APPCONTROL_REQUEST_FONT_TYPE = 0x21;
+static const char APPCONTROL_REQUEST_FONT_SIZE = 0x22;
+static const char APPCONTROL_TYPE = 0x01;
+static const char APPCONTROL_SIZE = 0x02;
+
static const int W_FONT_ITEM_RIGHT_GAP = 100;
static const int ID_GROUP_FONT = 0;
static const int ID_GROUP_FONT_ITEM_COUNT = 1;
static const int SECOND_CONTROL_ITEM = 1;
FontForm::FontForm(void)
- : __isAppControlRequest(false)
+ : __isAppControlRequest(APPCONTROL_DEFAULT)
, __categoryCheck(L"")
, __isFontTypeExpend(false)
{
{
__categoryCheck = static_cast<String*>(pArgs->GetAt(0))->GetPointer();
- if ((__categoryCheck == L"category:FontType") || (__categoryCheck == L"category:FontSize"))
+ if (__categoryCheck.CompareTo(L"http://tizen.org/appcontrol/data/font/type") == 0)
{
- SetAppControlRequest(true);
-
- if (__categoryCheck.Equals(L"category:FontType", false))
- {
- __pTableView->SetItemEnabled(ID_GROUP_FONT_SIZE, ID_ITEM_FONT_SIZE, false);
- }
- else
- {
- __pTableView->SetItemEnabled(ID_GROUP_FONT, ID_ITEM_FONT_TYPE, false);
- }
+ SetAppControlRequest(APPCONTROL_REQUEST_FONT_TYPE);
+ __pTableView->SetItemEnabled(ID_GROUP_FONT_SIZE, ID_ITEM_FONT_SIZE, false);
}
+ else if (__categoryCheck.Equals(L"http://tizen.org/appcontrol/data/font/size", false))
+ {
+ SetAppControlRequest(APPCONTROL_REQUEST_FONT_SIZE);
+ __pTableView->SetItemEnabled(ID_GROUP_FONT, ID_ITEM_FONT_TYPE, false);
+ }
+
delete pArgs;
}
- __pTableView->Draw(true);
+ __pTableView->UpdateTableView();
String currentFontType;
AppAssert(pSceneManager);
__pTableView->CollapseGroup(ID_GROUP_FONT_LIST);
- if (GetAppControlRequest() == true)
+ if (GetAppControlRequest() != APPCONTROL_DEFAULT)
{
UiApp* pApp = UiApp::GetInstance();
AppAssert(pApp);
int itemHeight = H_GROUP_ITEM_DEFAULT;
Rectangle detailArrow;
Bitmap* pBitmap = null;
+ char appControlRequest;
if (groupIndex == ID_GROUP_FONT_LIST)
{
relativeLayout.SetRelation(*pLabel, *pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
}
- if (GetAppControlRequest() == true)
+ if ((appControlRequest = GetAppControlRequest()) != APPCONTROL_DEFAULT)
{
- if (__categoryCheck.Equals(L"category:FontType", false))
+ if (appControlRequest & APPCONTROL_TYPE)
{
if (groupIndex == ID_GROUP_FONT_SIZE)
{
pItem = null;
}
}
- else if (__categoryCheck.Equals(L"category:FontSize", false))
+ else if (appControlRequest & APPCONTROL_SIZE)
{
if ((groupIndex == ID_GROUP_FONT) || (groupIndex == ID_GROUP_FONT_LIST))
{
String value;
AppControlProviderManager* pAppManager = AppControlProviderManager::GetInstance();
-#if 0
- IList* pDefaultResultIList = null;
- ArrayList* pDataList = null;
-
- pDataList = new (std::nothrow) ArrayList();
- pDataList->Construct();
-
- pDataList->Add(*(new (std::nothrow) String(L"APPCONTROL_RESULT_SUCCEEDED")));
- pDataList->Add(*(new (std::nothrow) String(__categoryCheck)));
-
- if (__categoryCheck == L"category:FontType")
- {
- SettingInfo::GetValue(SETTING_INFO_KEY_FONT_TYPE, value);
- }
- else if (__categoryCheck == L"category:FontSize")
- {
- SettingInfo::GetValue(SETTING_INFO_KEY_FONT_SIZE, value);
- }
- pDataList->Add(*(new (std::nothrow) String(value)));
-
- pDefaultResultIList = (pDataList->GetItemsN(0, pDataList->GetCount()));
-
- pAppManager->SendAppControlResult(reqId, pDefaultResultIList);
-
- pDataList->RemoveAll(true);
- delete pDataList;
- pDefaultResultIList->RemoveAll(true);
- delete pDefaultResultIList;
-#else
HashMap* hashMap = new (std::nothrow) HashMap();
hashMap->Construct();
- if (__categoryCheck == L"category:FontType")
+ if (GetAppControlRequest() == APPCONTROL_REQUEST_FONT_TYPE)
{
SettingInfo::GetValue(SETTING_INFO_KEY_FONT_TYPE, value);
- hashMap->Add(*(new (std::nothrow) String(L"category")), *(new (std::nothrow) String(L"FontType")));
- hashMap->Add(*(new (std::nothrow) String(L"type")), *(new (std::nothrow) String(value)));
-
+ hashMap->Add(*(new (std::nothrow) String(L"http://tizen.org/appcontrol/data/font/type")), *(new (std::nothrow) String(value)));
}
- else if (__categoryCheck == L"category:FontSize")
+ else if (GetAppControlRequest() == APPCONTROL_REQUEST_FONT_SIZE)
{
SettingInfo::GetValue(SETTING_INFO_KEY_FONT_SIZE, value);
- hashMap->Add(*(new (std::nothrow) String(L"category")), *(new (std::nothrow) String(L"FontSize")));
- hashMap->Add(*(new (std::nothrow) String(L"size")), *(new (std::nothrow) String(value)));
+ hashMap->Add(*(new (std::nothrow) String(L"http://tizen.org/appcontrol/data/font/size")), *(new (std::nothrow) String(value)));
}
pAppManager->SendAppControlResult(reqId, APP_CTRL_RESULT_SUCCEEDED, hashMap);
hashMap->RemoveAll();
delete hashMap;
-#endif
}
result
}
}
-bool
+char
FontForm::GetAppControlRequest(void)
{
return __isAppControlRequest;
}
void
-FontForm::SetAppControlRequest(bool requestStatus)
+FontForm::SetAppControlRequest(char requestStatus)
{
__isAppControlRequest = requestStatus;
}
\ No newline at end of file
-//
+//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Flora License, Version 1.0 (the License);
using namespace Tizen::Ui::Controls;
using namespace Tizen::Ui::Scenes;
+static const char APPCONTROL_REQUEST_DEFAULT = 0x00;
+static const char APPCONTROL_REQUEST_LOCATION = 0x20;
+
static const int ID_GROUP_GPS_1 = 0;
static const int ID_GROUP_GPS_1_ITEM_COUNT = 1;
static const int ID_ITEM_GPS_ON_OFF = 0;
static const int RELATIVE_LAYOUT_RIGHT_MARGIN_ONOFF_SLIDING = 120;
LocationForm::LocationForm(void)
- : __isAppControlRequest(false)
+ : __isAppControlRequest(APPCONTROL_REQUEST_DEFAULT)
, __categoryCheck(L"")
{
}
{
__categoryCheck = static_cast<String*>(pArgs->GetAt(0))->GetPointer();
- if (__categoryCheck == L"category:Location")
+ if (__categoryCheck.CompareTo(L"http://tizen.org/appcontrol/data/location/gps") == 0)
+ {
+ __isAppControlRequest = APPCONTROL_REQUEST_LOCATION;
+ }
+ else if (__categoryCheck.CompareTo(L"http://tizen.org/appcontrol/data/location/wps") == 0)
{
- __isAppControlRequest = true;
+ __isAppControlRequest = APPCONTROL_REQUEST_LOCATION;
}
+
delete pArgs;
}
}
SceneManager* pSceneManager = SceneManager::GetInstance();
AppAssert(pSceneManager);
- if (__isAppControlRequest == true)
+ if (__isAppControlRequest != APPCONTROL_REQUEST_DEFAULT)
{
UiApp* pApp = UiApp::GetInstance();
AppAssert(pApp);
HashMap* hashMap = new (std::nothrow) HashMap();
hashMap->Construct();
- if (__categoryCheck == L"category:Location")
+ if ((__categoryCheck.CompareTo(L"http://tizen.org/appcontrol/data/location/gps") == 0)
+ || (__categoryCheck.CompareTo(L"http://tizen.org/appcontrol/data/location/wps") == 0)
+ )
{
SettingInfo::GetValue(SETTING_INFO_KEY_LOCATION_GPS, gpsStatus);
SettingInfo::GetValue(SETTING_INFO_KEY_LOCATION_WPS, wpsStatus);
{
status = L"GPSDisabled";
}
- hashMap->Add(*(new (std::nothrow) String(L"GPS")), *(new (std::nothrow) String(status)));
+
+ hashMap->Add(*(new (std::nothrow) String(L"http://tizen.org/appcontrol/data/location/gps")), *(new (std::nothrow) String(status)));
if (wpsStatus == true)
{
{
status = L"WPSDisabled";
}
- hashMap->Add(*(new (std::nothrow) String(L"WPS")), *(new (std::nothrow) String(status)));
+
+ hashMap->Add(*(new (std::nothrow) String(L"http://tizen.org/appcontrol/data/location/wps")), *(new (std::nothrow) String(status)));
}
pAppManager->SendAppControlResult(reqId, ResultValue, hashMap);
static const wchar_t* APPCONTROL_OPERATION_ID_CONFIGURE = L"http://tizen.org/appcontrol/operation/configure";
static const wchar_t* APPCONTROL_PROVIDER_ID_PHONE = L"tizen.phone";
-static const wchar_t* APPCONTROL_PROVIDER_ID_MESSAGE = L"tizen.messages";
-static const wchar_t* APPCONTROL_PROVIDER_ID_EMAIL = L"tizen.email";
-static const wchar_t* APPCONTROL_PROVIDER_ID_CONTACTS = L"tizen.contacts";
-static const wchar_t* APPCONTROL_PROVIDER_ID_CALENDAR = L"tizen.calendar";
-static const wchar_t* APPCONTROL_PROVIDER_ID_GALLERY = L"tizen.gallery";
static const wchar_t* APPCONTROL_PROVIDER_ID_ACCOUNT = L"ZsnYtAdjl2.Account";
static const wchar_t* ID_RELATIVE_SETTING_XML_FILE_PATH = L"/setting/setting.xml";
static const int ID_ITEM_DEVICE_DISPLAY = 0;
static const int ID_ITEM_DEVICE_SOUND = 1;
static const int ID_ITEM_DEVICE_LOCATION = 2;
-static const int ID_ITEM_DEVICE_DATE_TIME = 3;
-static const int ID_ITEM_DEVICE_LANGUAGE_KEYBOARD = 4;
-static const int ID_GROUP_DEVICE_ITEM_COUNT = 5;
+static const int ID_ITEM_DEVICE_CALL_SETTING = 3;
+static const int ID_ITEM_DEVICE_DATE_TIME = 4;
+static const int ID_ITEM_DEVICE_LANGUAGE_KEYBOARD = 5;
+static const int ID_GROUP_DEVICE_ITEM_COUNT = 6;
static const int ID_GROUP_SYSTEM = 4;
static const int ID_ITEM_SYSTEM_MANAGE_APPLICATION = 0;
-static const int ID_ITEM_SYSTEM_DEVELOPER_OPTION = 1;
-static const int ID_ITEM_SYSTEM_ABOUT_PHONE = 2;
-static const int ID_GROUP_SYSTEM_ITEM_COUNT = 3;
-
-static const int ID_GROUP_APPLICATION = 5;
-static const int ID_ITEM_APPLICATIONS_PHONE = 0;
-static const int ID_ITEM_APPLICATIONS_MESSAGE = 1;
-static const int ID_ITEM_APPLICATIONS_EMAIL = 2;
-static const int ID_ITEM_APPLICATIONS_CONTACTS = 3;
-static const int ID_ITEM_APPLICATIONS_CALENDAR = 4;
-static const int ID_ITEM_APPLICATIONS_GALLERY = 5;
-static const int ID_ITEM_APPLICATIONS_ACCOUNT = 6;
-static const int ID_GROUP_APPLICATIONS_ITEM_COUNT = 6;
-
-static const int ID_GROUP_APPSETTING = 6;
-static const int ID_GROUP_NO_APPSETTING = 6;
+static const int ID_ITEM_SYSTEM_DEVELOPER_OPTION = 2;
+static const int ID_ITEM_SYSTEM_ABOUT_PHONE = 1;
+static const int ID_GROUP_SYSTEM_ITEM_COUNT = 2;
+
+static const int ID_GROUP_APPSETTING = 5;
+static const int ID_GROUP_NO_APPSETTING = 5;
static const int ID_MAIN_MENU_DEFAULT_COUNT = 1;
void
: __pDownloadAppIdKeyList(null)
, __pAppIdHashMap(null)
, __pAppIconPathHashMap(null)
- , __footerViewType()
, __pFlightModeSetValueAsyncResultListener(null)
{
}
}
break;
- case ID_GROUP_APPLICATION:
- {
- itemCount = ID_GROUP_APPLICATIONS_ITEM_COUNT;
- }
- break;
-
case ID_GROUP_APPSETTING:
{
itemCount = GetDownLoadAppCount();
}
break;
- case ID_GROUP_APPLICATION:
- {
- groupText = ResourceManager::GetString(L"IDS_ST_BODY_APPLICATION");
- }
- break;
-
case ID_GROUP_APPSETTING:
{
groupText = ResourceManager::GetString(L"IDS_ST_BODY_DOWNLOADED_APPLICATIONS");
ItemTypeIconAndOneLine(itemRectIcon, itemRectLabel);
itemHeight = (itemRectLabel.height + itemRectSecondLabel.height);
- pBitmap = ResourceManager::GetBitmapN(IDB_BLUETOOTH);
+ pBitmap = ResourceManager::GetBitmapN(IDB_NFC);
itemText = L"NFC";
}
break;
case ID_ITEM_PERSONAL_LOCK_SCREEN:
{
- pBitmap = ResourceManager::GetBitmapN(IDB_WALLPAPER);
+ pBitmap = ResourceManager::GetBitmapN(IDB_LOCK_SCREEN);
itemText = ResourceManager::GetString(L"IDS_ST_BODY_LOCK_SCREEN");
}
break;
}
break;
+ case ID_ITEM_DEVICE_CALL_SETTING:
+ {
+ pBitmap = ResourceManager::GetBitmapN(IDB_PHONE);
+ itemText = L"Call setting";
+ }
+ break;
+
case ID_ITEM_DEVICE_DATE_TIME:
{
pBitmap = ResourceManager::GetBitmapN(IDB_DATE_AND_TIME);
}
break;
- case ID_GROUP_APPLICATION:
- {
- switch (itemIndex)
- {
- case ID_ITEM_APPLICATIONS_PHONE:
- {
- pBitmap = ResourceManager::GetBitmapN(IDB_PHONE);
- itemText = ResourceManager::GetString(L"IDS_ST_BODY_PHONE");
- }
- break;
-
- case ID_ITEM_APPLICATIONS_MESSAGE:
- {
- pBitmap = ResourceManager::GetBitmapN(IDB_MESSAGE);
- itemText = ResourceManager::GetString(L"IDS_ST_BODY_SIDEBAR_MESSAGES");
- }
- break;
-
- case ID_ITEM_APPLICATIONS_EMAIL:
- {
- pBitmap = ResourceManager::GetBitmapN(IDB_EMAIL);
- itemText = ResourceManager::GetString(L"IDS_ST_BODY_EMAIL");
- }
- break;
-
- case ID_ITEM_APPLICATIONS_CONTACTS:
- {
- pBitmap = ResourceManager::GetBitmapN(IDB_CONTACTS);
- itemText = ResourceManager::GetString(L"IDS_ST_BODY_CONTACTS");
- }
- break;
-
- case ID_ITEM_APPLICATIONS_CALENDAR:
- {
- pBitmap = ResourceManager::GetBitmapN(IDB_CALENDAR);
- itemText = ResourceManager::GetString(L"IDS_ST_BODY_CALENDAR");
- }
- break;
-
- case ID_ITEM_APPLICATIONS_GALLERY:
- {
- pBitmap = ResourceManager::GetBitmapN(IDB_GALLERY);
- itemText = ResourceManager::GetString(L"IDS_ST_BODY_GALLERY");
- }
- break;
-
- default:
- break;
- }
- }
- break;
-
case ID_GROUP_APPSETTING:
{
String appIdKey = GetDownLoadAppIdKeyAt(itemIndex);
void
MainMenuForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
{
- bool enableStatus = false;
SceneManager* pSceneManager = SceneManager::GetInstance();
AppAssert(pSceneManager);
}
break;
- case ID_GROUP_APPLICATION:
- {
- pSceneName = L"";
- FindAppControlScene(itemIndex);
- }
- break;
-
case ID_GROUP_APPSETTING:
{
String appIdKey = GetDownLoadAppIdKeyAt(itemIndex);
__pAppIdHashMap->RemoveAll();
delete __pAppIdHashMap;
__pAppIdHashMap = null;
+ }
+ if (__pAppIconPathHashMap != null)
+ {
__pAppIconPathHashMap->RemoveAll();
delete __pAppIconPathHashMap;
__pAppIconPathHashMap = null;
{
pScene = IDSCN_NULL;
- ArrayList* pDataList = new (std::nothrow) ArrayList(SingleObjectDeleter);
- pDataList->Construct();
-
- AppControl* pAppControl = AppManager::FindAppControlN(APPCONTROL_PROVIDER_ID_ACCOUNT, APPCONTROL_OPERATION_ID_CONFIGURE);
-
- if (pAppControl)
- {
- pAppControl->Start(pDataList, null);
- delete pAppControl;
- }
+ FindAppControlScene(itemIndex);
}
break;
}
break;
+ case ID_ITEM_DEVICE_CALL_SETTING:
+ {
+ pScene = IDSCN_NULL;
+
+ FindAppControlScene(itemIndex);
+ }
+ break;
+
case ID_ITEM_DEVICE_DATE_TIME:
{
pScene = IDSCN_DATE_TIME;
switch (itemIndex)
{
- case ID_ITEM_APPLICATIONS_PHONE:
- {
- providerId = APPCONTROL_PROVIDER_ID_PHONE;
- }
- break;
-
- case ID_ITEM_APPLICATIONS_MESSAGE:
- {
- providerId = APPCONTROL_PROVIDER_ID_MESSAGE;
- }
- break;
-
- case ID_ITEM_APPLICATIONS_EMAIL:
- {
- providerId = APPCONTROL_PROVIDER_ID_EMAIL;
- }
- break;
-
- case ID_ITEM_APPLICATIONS_CONTACTS:
- {
- providerId = APPCONTROL_PROVIDER_ID_CONTACTS;
- }
- break;
-
- case ID_ITEM_APPLICATIONS_CALENDAR:
- {
- providerId = APPCONTROL_PROVIDER_ID_CALENDAR;
- }
- break;
-
- case ID_ITEM_APPLICATIONS_GALLERY:
+ case ID_ITEM_PERSONAL_ACCOUNTS:
{
- providerId = APPCONTROL_PROVIDER_ID_GALLERY;
+ providerId = APPCONTROL_PROVIDER_ID_ACCOUNT;
}
break;
- case ID_ITEM_APPLICATIONS_ACCOUNT:
+ case ID_ITEM_DEVICE_CALL_SETTING:
{
- providerId = APPCONTROL_PROVIDER_ID_ACCOUNT;
+ providerId = APPCONTROL_PROVIDER_ID_PHONE;
}
break;
checkSecondText = true;
ItemTypeIconAndTwoLine(itemIconRect, itemIconLabelRect, itemSecondLineTextRect, fontSize);
itmeHeight = (itemIconLabelRect.height + itemSecondLineTextRect.height);
+ pBitmap = ResourceManager::GetBitmapN(IDB_BLUETOOTH);
if (SystemInfo::GetValue(SYSTEM_INFO_KEY_BLUETOOTH, EnableStatus) == E_SUCCESS)
{
checkSecondText = true;
ItemTypeIconAndTwoLine(itemIconRect, itemIconLabelRect, itemSecondLineTextRect, fontSize);
itmeHeight = (itemIconLabelRect.height + itemSecondLineTextRect.height);
- pBitmap = ResourceManager::GetBitmapN(IDB_BLUETOOTH);
+ pBitmap = ResourceManager::GetBitmapN(IDB_NFC);
style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING;
if (SystemInfo::GetValue(SYSTEM_INFO_KEY_NFC, EnableStatus) == E_SUCCESS)
pItem->Construct(relativeLayout, Dimension(itemWidth, itmeHeight), style);
pItem->SetBackgroundColor(COLOR_BG_GROUP_ITEM_DEFAULT);
- pBitmap = ResourceManager::GetBitmapN(IDB_BLUETOOTH);
-
if (pBitmap == null)
{
pLabel = new (std::nothrow) Label();
-//
+//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Flora License, Version 1.0 (the License);
using namespace Tizen::Ui::Scenes;
static const int FRFRESH_REQUEST_EVENT = 9999;
-//static const int ITEM_COUNT_ONE = 1;
-static const int CATEGORY_LIST_ITEM_COUNT = 6;
-
-static const wchar_t* CATEGORY_KEY = L"category";
-static const wchar_t* DELIMITER = L":";
-
-//static const wchar_t* APPCONTROL_PROVIDER_ID_SETTINGS = L"http://tizen.org/appcontrol/provider/settings";
-static const wchar_t* APPCONTROL_OPERATION_ID_CONFIGURE = L"http://tizen.org/appcontrol/operation/configure";
-
-//static const wchar_t* APPCONTROL_PROVIDER_ID_BLUETOOTH = L"http://tizen.org/appcontrol/provider/bluetooth";
-//static const wchar_t* APPCONTROL_OPERATION_ID_PICK = L"http://tizen.org/appcontrol/operation/pick";
-//static const wchar_t* APPCONTROL_TIME_ZONE = L"category:TimeZone";
+static const wchar_t* APPCONTROL_OPERATION_ID_CONFIGURE_LOCATION = L"http://tizen.org/appcontrol/operation/configure/location";
+static const wchar_t* APPCONTROL_OPERATION_ID_CONFIGURE_BLUETOOTH_VISIBILITY = L"http://tizen.org/appcontrol/operation/configure/bluetooth/visibility";
+static const wchar_t* APPCONTROL_OPERATION_ID_CONFIGURE_FONT_TYPE = L"http://tizen.org/appcontrol/operation/configure/font/type";
+static const wchar_t* APPCONTROL_OPERATION_ID_CONFIGURE_FONT_SIZE = L"http://tizen.org/appcontrol/operation/configure/font/size";
typedef struct _catetory_list {
String category;
const wchar_t* sceneName;
}CATEGORY_LIST;
-CATEGORY_LIST categoryList[CATEGORY_LIST_ITEM_COUNT] = {
- { L"category:Location", IDSCN_LOCATION },
- { L"category:Bluetooth.Visibility", IDSCN_BLUETOOTH },
- { L"category:USB", IDSCN_DEVELOPER_OPTION },
- { L"category:FontType", IDSCN_FONT },
- { L"category:FontSize", IDSCN_FONT },
- { L"category:WifiDirect", IDSCN_WIFI_DIRECT },
+enum _appControlExtraKey
+{
+ APPCONTROL_EXTRA_KEY_LOCATION_GPS = 0,
+ APPCONTROL_EXTRA_KEY_LOCATION_WPS,
+ APPCONTROL_EXTRA_KEY_BLUETOOTH_VISIBILITY,
+ APPCONTROL_EXTRA_KEY_FONT_TYPE,
+ APPCONTROL_EXTRA_KEY_FONT_SIZE,
+ APPCONTROL_EXTRA_KEY_MAX
+};
+
+CATEGORY_LIST extraDataKeyList[APPCONTROL_EXTRA_KEY_MAX] = {
+ { L"http://tizen.org/appcontrol/data/location/gps", IDSCN_LOCATION },
+ { L"http://tizen.org/appcontrol/data/location/wps", IDSCN_LOCATION },
+ { L"http://tizen.org/appcontrol/data/bluetooth/visibility", IDSCN_BLUETOOTH },
+ { L"http://tizen.org/appcontrol/data/font/type", IDSCN_FONT },
+ { L"http://tizen.org/appcontrol/data/font/size", IDSCN_FONT }
};
SettingsApp::SettingsApp(void)
SettingsApp::OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::String& operationId, const Tizen::Base::String* pUriData,
const Tizen::Base::String* pMimeType, const Tizen::Base::Collection::IMap* pExtraData)
{
- if (operationId.Equals(APPCONTROL_OPERATION_ID_CONFIGURE, true))
+ AppLogDebug("ENTER");
+ if (operationId.CompareTo(APPCONTROL_OPERATION_ID_CONFIGURE_LOCATION) == 0)
{
- int count = 0;
+ AppLogDebug("operationId[%ls]", operationId.GetPointer());
+
const wchar_t* pSceneName = null;
ArrayList* pArgs = new (std::nothrow) ArrayList();
pArgs->Construct();
- String* pCategoryKey = new (std::nothrow) String(CATEGORY_KEY);
- pCategoryKey->Append(DELIMITER);
- pCategoryKey->Append(*static_cast<const String*>(pExtraData->GetValue(String(CATEGORY_KEY))));
- pArgs->Add(pCategoryKey);
+//*
+ pSceneName = extraDataKeyList[APPCONTROL_EXTRA_KEY_LOCATION_GPS].sceneName;
+ pArgs->Add(new (std::nothrow) String(L"http://tizen.org/appcontrol/data/location/gps"));
+/*/
+ ArrayList* pExtraKey = static_cast<ArrayList*>(pExtraData->GetKeysN());
+ String keyData = *static_cast<String*>(pExtraKey->GetAt(0));
+ AppLogDebug("key[%ls]", keyData.GetPointer());
+ pArgs->Add(new (std::nothrow) String(keyData));
+//*/
- for (count = 0; count < CATEGORY_LIST_ITEM_COUNT; count++)
+ if (pSceneName == null)
+ {
+ Terminate();
+ }
+ else
+ {
+ __pArgs = pArgs;
+ __requestId = reqId;
+ __initialSceneId = pSceneName;
+ }
+ }
+ else if (operationId.CompareTo(APPCONTROL_OPERATION_ID_CONFIGURE_BLUETOOTH_VISIBILITY) == 0)
+ {
+ AppLogTag("hwkim","operationId[%ls]", operationId.GetPointer());
+ const wchar_t* pSceneName = null;
+ ArrayList* pArgs = new (std::nothrow) ArrayList();
+ pArgs->Construct();
+
+//*
+ pSceneName = extraDataKeyList[APPCONTROL_EXTRA_KEY_BLUETOOTH_VISIBILITY].sceneName;
+ pArgs->Add(new (std::nothrow) String(L"http://tizen.org/appcontrol/data/bluetooth/visibility"));
+/*/
+ ArrayList* pExtraKey = static_cast<ArrayList*>(pExtraData->GetKeysN());
+ String keyData = *static_cast<String*>(pExtraKey->GetAt(0));
+ AppLogDebug("key[%ls]", keyData.GetPointer());
+ pArgs->Add(new (std::nothrow) String(keyData));
+//*/
+
+ if (pSceneName == null)
+ {
+ Terminate();
+ }
+ else
{
- if (pCategoryKey->CompareTo(categoryList[count].category) == 0)
- {
- pSceneName = categoryList[count].sceneName;
- break;
- }
+ __pArgs = pArgs;
+ __requestId = reqId;
+ __initialSceneId = pSceneName;
}
+ }
+ else if (operationId.CompareTo(APPCONTROL_OPERATION_ID_CONFIGURE_FONT_TYPE) == 0)
+ {
+ const wchar_t* pSceneName = null;
+ ArrayList* pArgs = new (std::nothrow) ArrayList();
+ pArgs->Construct();
+//*
+ pSceneName = extraDataKeyList[APPCONTROL_EXTRA_KEY_FONT_TYPE].sceneName;
+ pArgs->Add(new (std::nothrow) String(L"http://tizen.org/appcontrol/data/font/type"));
+/*/
+ ArrayList* pExtraKey = static_cast<ArrayList*>(pExtraData->GetKeysN());
+ String keyData = *static_cast<String*>(pExtraKey->GetAt(0));
+ AppLogDebug("key[%ls]", keyData.GetPointer());
+ pArgs->Add(new (std::nothrow) String(keyData));
+//*/
if (pSceneName == null)
{
Terminate();
__pArgs = pArgs;
__requestId = reqId;
__initialSceneId = pSceneName;
+ }
+ }
+ else if (operationId.CompareTo(APPCONTROL_OPERATION_ID_CONFIGURE_FONT_SIZE) == 0)
+ {
+ const wchar_t* pSceneName = null;
+ ArrayList* pArgs = new (std::nothrow) ArrayList();
+ pArgs->Construct();
- AppLogDebug("[%ls] , [%d]", pSceneName, reqId);
+//*
+ pSceneName = extraDataKeyList[APPCONTROL_EXTRA_KEY_FONT_TYPE].sceneName;
+ pArgs->Add(new (std::nothrow) String(L"http://tizen.org/appcontrol/data/font/size"));
+/*/
+ ArrayList* pExtraKey = static_cast<ArrayList*>(pExtraData->GetKeysN());
+ String keyData = *static_cast<String*>(pExtraKey->GetAt(0));
+ AppLogDebug("key[%ls]", keyData.GetPointer());
+ pArgs->Add(new (std::nothrow) String(keyData));
+//*/
+ if (pSceneName == null)
+ {
+ Terminate();
+ }
+ else
+ {
+ __pArgs = pArgs;
+ __requestId = reqId;
+ __initialSceneId = pSceneName;
+ }
+ }
+ else
+ {
+ if (operationId.CompareTo(L"http://tizen.org/appcontrol/operation/main"))
+ {
+ AppLogDebug("operationId is not main terminate");
+ Terminate();
}
}
}
\ No newline at end of file
const wchar_t* IDB_NETWORK = L"settings_74_network.png";
const wchar_t* IDB_BLUETOOTH = L"settings_74_bluetooth.png";
const wchar_t* IDB_WIFI_DIRECT = L"settings_74_wifi_direct.png";
+const wchar_t* IDB_NFC = L"settings_106_nfc.png";
//System
const wchar_t* IDB_EVENT_NOTIFICATION = L"settings_74_event.png";
-const wchar_t* IDB_WALLPAPER = L"A01-1_icon_Wallpaper.png";
+const wchar_t* IDB_WALLPAPER = L"settings_106_wallpaper.png";
+const wchar_t* IDB_LOCK_SCREEN = L"settings_106_lockscreen.png";
const wchar_t* IDB_SOUND = L"settings_74_sound.png";
const wchar_t* IDB_BRIGHTNESS = L"A01-1_icon_Brightness.png";
const wchar_t* IDB_SECURITY = L"settings_74_security.png";