TBT_APP_FEATURE_SUMMARY,
- TBT_APP_RUNTIME_INFO,
+ TBT_APP_AUDIO_JACK,
+ TBT_APP_KEY_VIBRATION,
+ TBT_APP_BATTERY,
+ TBT_APP_GPS_STATUS,
+ TBT_APP_USB_CONNECTED,
+ TBT_APP_BLUETOOTH_ENABLED,
+ TBT_APP_AUTO_ROTATION_ENABLED,
+ TBT_APP_LOCATION_SERVICE_ENABLED,
+ TBT_APP_WIFI_HOTSPOT_ENABLED,
TBT_APP_OAUTH2,
TBT_APP_WIDGET,
+ TBT_APP_STORAGE,
+
+ TBT_APP_MEDIA_KEY,
+
+ TBT_APP_PACKAGE_MANAGER,
+
+ TBT_APP_RADIO,
+
+ TBT_APP_SOUND_MANAGER,
+
+ TBT_APP_SOUND_MANAGER_DEVICE,
+
+
+ TBT_APP_NOTIFICATION_TEXT,
+
+ TBT_APP_NOTIFICATION_TIME,
+
+ TBT_APP_NOTIFICATION_TITLE,
+
+ TBT_APP_NOTIFICATION_IMAGE,
+
+ TBT_APP_CONNECTION,
+
TBT_APP_SYSTEM_SETTINGS_FONT,
TBT_APP_SYSTEM_SETTINGS_TIMEFORMAT,
TBT_APP_SYSTEM_SETTINGS_TIMECHANGE,
"tizen.org/feature/bluetooth.spp",
"tizen.org/feature/network.nfc.p2p",
"tizen.org/feature/network.nfc.tag",
- "tizen.org/feature/sensor.photometer,"
- "tizen.org/feature/sensor.ultraviolet"
+ "tizen.org/feature/sensor.photometer",
+ "tizen.org/feature/sensor.ultraviolet",
+ "tizen.org/feature/notification"
+
};
#endif /* __TBT_INFO_H__ */
//#define TBT_MODULE_PUSH
//#define TBT_MODULE_APP_PUSH_SERVICE
-//#define TBT_MODULE_RUNTIME
-//#define TBT_MODULE_APP_RUNTIME_INFO
+#define TBT_MODULE_RUNTIME
+#define TBT_MODULE_APP_AUDIO_JACK
+#define TBT_MODULE_APP_KEY_VIBRATION
+#define TBT_MODULE_APP_BATTERY
+#define TBT_MODULE_APP_GPS_STATUS
+#define TBT_MODULE_APP_USB_CONNECTED
+#define TBT_MODULE_APP_BLUETOOTH_ENABLED
+#define TBT_MODULE_APP_AUTO_ROTATION_ENABLED
+#define TBT_MODULE_APP_LOCATION_SERVICE_ENABLED
+#define TBT_MODULE_APP_WIFI_HOTSPOT_ENABLED
#define TBT_MODULE_FEATURE
#define TBT_MODULE_APP_FEATURE_SUMMARY
+#define TBT_MODULE_STORAGE
+#define TBT_MODULE_APP_STORAGE
+
+#define TBT_MODULE_RADIO
+#define TBT_MODULE_APP_RADIO
+
+#define TBT_MODULE_SOUND_MANAGER
+#define TBT_MODULE_APP_SOUND_MANAGER
+#define TBT_MODULE_APP_SOUND_MANAGER_DEVICE
+
+#define TBT_MODULE_MEDIA_KEY
+#define TBT_MODULE_APP_MEDIA_KEY
+
+#define TBT_MODULE_PACKAGE_MANAGER
+#define TBT_MODULE_APP_PACKAGE_MANAGER
+
+#define TBT_MODULE_NOTIFICATION
+#define TBT_MODULE_APP_NOTIFICATION
+#define TBT_MODULE_APP_NOTIFICATION_TIME
+#define TBT_MODULE_APP_NOTIFICATION_TITLE
+#define TBT_MODULE_APP_NOTIFICATION_IMAGE
+
+#define TBT_MODULE_CONNECTION
+#define TBT_MODULE_APP_CONNECTION
+
#define TBT_MODULE_SYSTEMSETTINGS
#define TBT_MODULE_APP_SYSTEM_SETTINGS_FONT
#define TBT_MODULE_APP_SYSTEM_SETTINGS_TIMEFORMAT
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *******************************************************************************/
+/**
+ * @file tbt-feature-view.h
+ * @brief checks availability of features in device
+ * @since_tizen 2.3
+ * @author A B M Nazibullah(nazib.ullah@samsung.com)
+ * @date October, 2014
+ * @bug NA
+ * @credit Tizen SDK Version 2.3.0 Sample Example
+ *
+ */
+
+#ifndef __TBT_CONNECTION_VIEW_H__
+#define __TBT_CONNECTION_VIEW_H__
+
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_CONNECTION
+
+#include <Evas.h>
+#include "model/tbt-list.h"
+
+
+/**
+ * @typedef feature_view
+ * @since_tizen 2.3
+ * @brief A feature viewer view handle.
+ */
+typedef struct _connection_view connection_view;
+
+/**
+ * @brief Add feature view
+ * @since_tizen 2.3
+ * @param[in] app The pointer to _app_data instance
+ * @param[in] navi The naviframe object
+ * @return Feature viewer view data
+ */
+connection_view *connection_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item);
+
+#endif
+#endif // __TBT_FEATURE_VIEW_H__
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *******************************************************************************/
+/**
+ * @file tbt-mediakey-view.h
+ * @brief retrieves mediakey info
+ * @since_tizen 3.0
+ * @author Nibha Sharma(nibha.sharma@samsung.com)
+ * @date June, 2016
+ * @bug none
+ * @credit
+ * @credit
+ *
+ */
+
+#ifndef __TBT_MEDIA_KEY_VIEW_H__
+#define __TBT_MEDIA_KEY_VIEW_H__
+
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_MEDIA_KEY
+
+#include <Evas.h>
+#include "model/tbt-list.h"
+#include <media_key.h>
+
+
+/**
+ * @typedef mediakey_viewer_view
+ * @since_tizen 3.0
+ * @brief A mediakey view handle.
+ */
+typedef struct _mediakey_view mediakey_view;
+
+/**
+ * @brief Create mediakey view
+ * @since_tizen 3.0
+ * @param[in] navi Parent naviframe
+ * @param[in] custom structute to hold tbt application information
+ * @param[in] item of the main tbt menu
+ * @return Pointer of mediakey on success, otherwise NULL
+ */
+mediakey_view *mediakey_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item);
+
+#endif
+#endif // __TBT_MEDIA_KEY_VIEW_H__
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *******************************************************************************/
+/**
+ * @file tbt-notification-view.h
+ * @brief retrieves notification info
+ * @since_tizen 3.0
+ * @author Nibha Sharma(nibha.sharma@samsung.com)
+ * @date June, 2016
+ * @bug none
+ * @credit
+ * @credit
+ *
+ */
+
+#ifndef __TBT_NOTIFICATION_VIEW_H__
+#define __TBT_NOTIFICATION_VIEW_H__
+
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_NOTIFICATION
+
+#include <Evas.h>
+#include "model/tbt-list.h"
+#include <notification.h>
+
+
+/**
+ * @typedef notification_viewer_view
+ * @since_tizen 3.0
+ * @brief A notification viewer view handle.
+ */
+typedef struct _notification_view notification_view;
+
+/**
+ * @brief Create notification view
+ * @since_tizen 3.0
+ * @param[in] navi Parent naviframe
+ * @param[in] custom structute to hold tbt application information
+ * @param[in] item of the main tbt menu
+ * @return Pointer of notification on success, otherwise NULL
+ */
+notification_view *notification_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item);
+
+#endif
+#endif // __TBT_NOTIFICATION_VIEW_H__
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *******************************************************************************/
+/**
+ * @file tbt-packagemanager-view.h
+ * @brief retrieves packagemanager info
+ * @since_tizen 3.0
+ * @author Nibha Sharma(nibha.sharma@samsung.com)
+ * @date June, 2016
+ * @bug none
+ * @credit
+ * @credit
+ *
+ */
+
+#ifndef __TBT_PACKAGE_MANAGER_VIEW_H__
+#define __TBT_PACKAGE_MANAGER_VIEW_H__
+
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_PACKAGE_MANAGER
+
+#include <Evas.h>
+#include "model/tbt-list.h"
+#include <package_manager.h>
+
+
+/**
+ * @typedef packagemanager_viewer_view
+ * @since_tizen 3.0
+ * @brief A packagemanager viewer view handle.
+ */
+typedef struct _packagemanager_view packagemanager_view;
+
+/**
+ * @brief Create packagemanager view
+ * @since_tizen 3.0
+ * @param[in] navi Parent naviframe
+ * @param[in] custom structute to hold tbt application information
+ * @param[in] item of the main tbt menu
+ * @return Pointer of packagemanager on success, otherwise NULL
+ */
+packagemanager_view *packagemanager_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item);
+
+#endif
+#endif // __TBT_PACKAGE_MANAGER_VIEW_H__
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *******************************************************************************/
+/**
+ * @file tbt-radio-view.h
+ * @brief retrieves radio info
+ * @since_tizen 3.0
+ * @author Nibha Sharma(nibha.sharma@samsung.com)
+ * @date June, 2016
+ * @bug none
+ * @credit
+ * @credit
+ *
+ */
+
+#ifndef __TBT_RADIO_VIEW_H__
+#define __TBT_RADIO_VIEW_H__
+
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_RADIO
+
+#include <Evas.h>
+#include "model/tbt-list.h"
+#include <radio.h>
+
+
+/**
+ * @typedef radio_viewer_view
+ * @since_tizen 3.0
+ * @brief A radio viewer view handle.
+ */
+typedef struct _radio_view radio_view;
+
+/**
+ * @brief Create radio view
+ * @since_tizen 3.0
+ * @param[in] navi Parent naviframe
+ * @param[in] custom structute to hold tbt application information
+ * @param[in] item of the main tbt menu
+ * @return Pointer of radio on success, otherwise NULL
+ */
+radio_view *radio_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item);
+
+#endif
+#endif // __TBT_RADIO_VIEW_H__
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *******************************************************************************/
+/**
+ * @file tbt-soundmanager-view.h
+ * @brief retrieves soundmanager info
+ * @since_tizen 2.3
+ * @author A. B. M. Nazibullah(nazib.ullah@samsung.com)
+ * @date October, 2014
+ * @bug none
+ * @credit
+ * @credit
+ *
+ */
+
+#ifndef __TBT_SOUND_MANAGER_VIEW_H__
+#define __TBT_SOUND_MANAGER_VIEW_H__
+
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_SOUND_MANAGER
+
+#include <Evas.h>
+#include "model/tbt-list.h"
+#include <sound_manager.h>
+
+
+/**
+ * @typedef soundmanager_viewer_view
+ * @since_tizen 2.3
+ * @brief A soundmanager viewer view handle.
+ */
+typedef struct _soundmanager_view soundmanager_view;
+
+/**
+ * @brief Create soundmanager view
+ * @since_tizen 2.3
+ * @param[in] navi Parent naviframe
+ * @param[in] custom structute to hold tbt application information
+ * @param[in] item of the main tbt menu
+ * @return Pointer of runtimeinfo on success, otherwise NULL
+ */
+soundmanager_view *soundmanager_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item);
+
+#endif
+#endif // __TBT_SOUND_MANAGER_VIEW_H__
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *******************************************************************************/
+/**
+ * @file tbt-storage-view.h
+ * @brief retrieves runtime info
+ * @since_tizen 3.0
+ * @author Nibha Sharma(nibha.sharma@samsung.com)
+ * @date June, 2016
+ * @bug none
+ * @credit
+ * @credit
+ *
+ */
+
+#ifndef __TBT_STORAGE_VIEW_H__
+#define __TBT_STORAGE_VIEW_H__
+
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_STORAGE
+
+#include <Evas.h>
+#include "model/tbt-list.h"
+#include <storage.h>
+
+
+/**
+ * @typedef storage_viewer_view
+ * @since_tizen 3.0
+ * @brief A storage viewer view handle.
+ */
+typedef struct _storage_view storage_view;
+
+/**
+ * @brief Create storage view
+ * @since_tizen 3.0
+ * @param[in] navi Parent naviframe
+ * @param[in] custom structute to hold tbt application information
+ * @param[in] item of the main tbt menu
+ * @return Pointer of storage on success, otherwise NULL
+ */
+storage_view *storage_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item);
+
+#endif
+#endif // __TBT_STORAGE_VIEW_H__
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "connection_viewer";
+ parts{
+ part{
+ name: "connection_view";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "mediakey_viewer";
+ parts{
+ part{
+ name: "media_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ part{
+ name: "media_key";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 TEXT_HEIGHT; }
+ rel2 {relative: 1.0 2*TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "notification_viewer";
+ parts{
+ part{
+ name: "notification_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "package_manager_viewer";
+ parts{
+ part{
+ name: "packagemanager_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ part{
+ name: "packagemanager_state";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 TEXT_HEIGHT; }
+ rel2 {relative: 1.0 2*TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "radio_viewer";
+ parts{
+ part{
+ name: "radio_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "sound_manager_viewer";
+ parts{
+ part{
+ name: "sound_manager_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "storage_viewer";
+ parts{
+ part{
+ name: "info_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "connection_viewer";
+ parts{
+ part{
+ name: "connection_view";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "mediakey_viewer";
+ parts{
+ part{
+ name: "media_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ part{
+ name: "media_key";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 TEXT_HEIGHT; }
+ rel2 {relative: 1.0 2*TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "notification_viewer";
+ parts{
+ part{
+ name: "notification_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "package_manager_viewer";
+ parts{
+ part{
+ name: "packagemanager_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ part{
+ name: "packagemanager_state";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 TEXT_HEIGHT; }
+ rel2 {relative: 1.0 2*TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "radio_viewer";
+ parts{
+ part{
+ name: "radio_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "sound_manager_viewer";
+ parts{
+ part{
+ name: "sound_manager_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "storage_viewer";
+ parts{
+ part{
+ name: "info_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_circle_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "connection_viewer";
+ parts{
+ part{
+ name: "connection_view";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+#define HEADER_HIGHT 0.23
+
+#include "wearable_circle_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "mediakey_viewer";
+ parts{
+ part{
+ name: "media_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 HEADER_HIGHT+0.0; }
+ rel2 {relative: 1.0 HEADER_HIGHT+TEXT_HEIGHT; }
+ }
+ }
+ part{
+ name: "media_key";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 HEADER_HIGHT+TEXT_HEIGHT; }
+ rel2 {relative: 1.0 HEADER_HIGHT+2*TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_circle_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "notification_viewer";
+ parts{
+ part{
+ name: "notification_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_circle_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "package_manager_viewer";
+ parts{
+ part{
+ name: "packagemanager_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ part{
+ name: "packagemanager_state";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 TEXT_HEIGHT; }
+ rel2 {relative: 1.0 2*TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_circle_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "radio_viewer";
+ parts{
+ part{
+ name: "radio_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_circle_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "sound_manager_viewer";
+ parts{
+ part{
+ name: "sound_manager_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_circle_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "storage_viewer";
+ parts{
+ part{
+ name: "info_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_360_x_480_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "connection_viewer";
+ parts{
+ part{
+ name: "connection_view";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_360_x_480_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "mediakey_viewer";
+ parts{
+ part{
+ name: "media_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ part{
+ name: "media_key";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 TEXT_HEIGHT; }
+ rel2 {relative: 1.0 2*TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_360_x_480_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "notification_viewer";
+ parts{
+ part{
+ name: "notification_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_360_x_480_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "package_manager_viewer";
+ parts{
+ part{
+ name: "packagemanager_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ part{
+ name: "packagemanager_state";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 TEXT_HEIGHT; }
+ rel2 {relative: 1.0 2*TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_360_x_480_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "radio_viewer";
+ parts{
+ part{
+ name: "radio_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_360_x_480_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "sound_manager_viewer";
+ parts{
+ part{
+ name: "sound_manager_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define TEXT_HEIGHT 0.08
+
+#include "wearable_360_x_480_toolbar.edc"
+
+collections
+{
+ base_scale: 1.8;
+ group
+ {
+ name: "storage_viewer";
+ parts{
+ part{
+ name: "info_text";
+ type: SWALLOW;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 {relative: 0.0 0.0; }
+ rel2 {relative: 1.0 TEXT_HEIGHT; }
+ }
+ }
+ WEARABLE_TOOLBAR_PART
+ }
+ }
+}
#endif
#ifdef TBT_MODULE_RUNTIME
- #ifdef TBT_MODULE_APP_RUNTIME_INFO
+ #ifdef TBT_MODULE_APP_AUDIO_JACK
//Runtime Info
{
- .name = "Runtime Info",
+ .name = "Audio Jack Status",
.parent = "Runtime Info",
- .apptype = TBT_APP_RUNTIME_INFO,
+ .apptype = TBT_APP_AUDIO_JACK,
.icon_name = "dummy",
.info = "View Audio Jack <br/>Insert Info",
.result = 0
},
#endif
+ #ifdef TBT_MODULE_APP_KEY_VIBRATION
+
+ //Runtime Info
+ {
+ .name = "Key Vibration Status",
+ .parent = "Runtime Info",
+ .apptype = TBT_APP_KEY_VIBRATION,
+ .icon_name = "dummy",
+ .info = "View Audio Jack <br/>Insert Info",
+ .result = 0
+ },
+ #endif
+ #ifdef TBT_MODULE_APP_BATTERY
+
+ //Runtime Info
+ {
+ .name = "Battery Status",
+ .parent = "Runtime Info",
+ .apptype = TBT_APP_BATTERY,
+ .icon_name = "dummy",
+ .info = "View Audio Jack <br/>Insert Info",
+ .result = 0
+ },
+ #endif
+ #ifdef TBT_MODULE_APP_GPS_STATUS
+
+ //Runtime Info
+ {
+ .name = "Gps Status",
+ .parent = "Runtime Info",
+ .apptype = TBT_APP_GPS_STATUS,
+ .icon_name = "dummy",
+ .info = "View Audio Jack <br/>Insert Info",
+ .result = 0,
+ .required_features_count = 1,
+ .features_required = {11}
+ },
+ #endif
+ #ifdef TBT_MODULE_APP_USB_CONNECTED
+
+ //Runtime Info
+ {
+ .name = "USB Status",
+ .parent = "Runtime Info",
+ .apptype = TBT_APP_USB_CONNECTED,
+ .icon_name = "dummy",
+ .info = "View Audio Jack <br/>Insert Info",
+ .result = 0
+ },
+ #endif
+ #ifdef TBT_MODULE_APP_BLUETOOTH_ENABLED
+
+ //Runtime Info
+ {
+ .name = "Bluetooth Status",
+ .parent = "Runtime Info",
+ .apptype = TBT_APP_BLUETOOTH_ENABLED,
+ .icon_name = "dummy",
+ .info = "View Audio Jack <br/>Insert Info",
+ .result = 0,
+ .required_features_count = 1,
+ .features_required = {16}
+ },
+ #endif
+ #ifdef TBT_MODULE_APP_AUTO_ROTATION_ENABLED
+
+ //Runtime Info
+ {
+ .name = "Auto Rotate Status",
+ .parent = "Runtime Info",
+ .apptype = TBT_APP_AUTO_ROTATION_ENABLED,
+ .icon_name = "dummy",
+ .info = "View Audio Jack <br/>Insert Info",
+ .result = 0,
+ .required_features_count = 1,
+ .features_required = {41}
+ },
+ #endif
+ #ifdef TBT_MODULE_APP_LOCATION_SERVICE_ENABLED
+
+ //Runtime Info
+ {
+ .name = "Location Status",
+ .parent = "Runtime Info",
+ .apptype = TBT_APP_LOCATION_SERVICE_ENABLED,
+ .icon_name = "dummy",
+ .info = "View Audio Jack <br/>Insert Info",
+ .result = 0,
+ .required_features_count = 1,
+ .features_required = {10}
+ },
+ #endif
+ #ifdef TBT_MODULE_APP_WIFI_HOTSPOT_ENABLED
+
+ //Runtime Info
+ {
+ .name = "Wifi HotSpot Status",
+ .parent = "Runtime Info",
+ .apptype = TBT_APP_WIFI_HOTSPOT_ENABLED,
+ .icon_name = "dummy",
+ .info = "View Audio Jack <br/>Insert Info",
+ .result = 0,
+ .required_features_count = 1,
+ .features_required = {24}
+ },
+ #endif
#endif
#ifdef TBT_MODULE_FEATURE
#endif
#endif
+#ifdef TBT_MODULE_STORAGE
+ #ifdef TBT_MODULE_APP_STORAGE
+
+ //Storage
+ {
+ .name = "SD-Card",
+ .parent = "Storage",
+ .apptype = TBT_APP_STORAGE,
+ .icon_name = "dummy",
+ .info = "Check Sd-Card <br/>",
+ .result = 0
+ },
+ #endif
+#endif
+#ifdef TBT_MODULE_MEDIA_KEY
+ #ifdef TBT_MODULE_APP_MEDIA_KEY
+
+ //Media Key
+ {
+ .name = "Media Key",
+ .parent = "Media Key",
+ .apptype = TBT_APP_MEDIA_KEY,
+ .icon_name = "dummy",
+ .info = "Press Media Key eg:Audio Jack Key",
+ .result = 0
+ },
+ #endif
+#endif
+#ifdef TBT_MODULE_PACKAGE_MANAGER
+ #ifdef TBT_MODULE_APP_PACKAGE_MANAGER
+
+ //Package Manager
+ {
+ .name = "Package Manager",
+ .parent = "Package Manager Status",
+ .apptype = TBT_APP_PACKAGE_MANAGER,
+ .icon_name = "dummy",
+ .info = "1.Please Uninstall package from Application manager<br/>2. Please install package in device from sdb shell<br/> 3.Update is re-install same package on the device",
+ .result = 0
+ },
+ #endif
+#endif
+#ifdef TBT_MODULE_RADIO
+ #ifdef TBT_MODULE_APP_RADIO
+
+ //RADIO
+ {
+ .name = "Radio",
+ .parent = "Radio",
+ .apptype = TBT_APP_RADIO,
+ .icon_name = "dummy",
+ .info = "Check Earphone",
+ .result = 0,
+ .required_features_count = 1,
+ .features_required = {6}
+ },
+ #endif
+#endif
+#ifdef TBT_MODULE_SOUND_MANAGER
+ #ifdef TBT_MODULE_APP_SOUND_MANAGER
+
+ //SOUND_MANAGER
+ {
+ .name = "Connection Status",
+ .parent = "Sound Manager",
+ .apptype = TBT_APP_SOUND_MANAGER,
+ .icon_name = "dummy",
+ .info = "Insert/Remove Audio jack",
+ .result = 0,
+ .required_features_count = 1,
+ .features_required = {13}
+ },
+ #endif
+ #ifdef TBT_MODULE_APP_SOUND_MANAGER_DEVICE
+
+ //SOUND_MANAGER
+ {
+ .name = "Device Status",
+ .parent = "Sound Manager",
+ .apptype = TBT_APP_SOUND_MANAGER_DEVICE,
+ .icon_name = "dummy",
+ .info = "Insert Audio jack and change sound profile to Sound",
+ .result = 0,
+ .required_features_count = 1,
+ .features_required = {13}
+ },
+ #endif
+#endif
+#ifdef TBT_MODULE_NOTIFICATION
+ #ifdef TBT_MODULE_APP_NOTIFICATION
+
+ //Notification
+ {
+ .name = "Notification Text",
+ .parent = "Notification Status",
+ .apptype = TBT_APP_NOTIFICATION_TEXT,
+ .icon_name = "dummy",
+ .info = "Notification is updated",
+ .result = 0,
+ .required_features_count = 1,
+ .features_required = {80}
+ },
+ #endif
+ #ifdef TBT_MODULE_APP_NOTIFICATION_TIME
+
+ //Notification
+ {
+ .name = "Notification Time",
+ .parent = "Notification Status",
+ .apptype = TBT_APP_NOTIFICATION_TIME,
+ .icon_name = "dummy",
+ .info = "Notification is updated",
+ .result = 0,
+ .required_features_count = 1,
+ .features_required = {80}
+ },
+ #endif
+ #ifdef TBT_MODULE_APP_NOTIFICATION_TITLE
+
+ //Notification
+ {
+ .name = "Notification Title",
+ .parent = "Notification Status",
+ .apptype = TBT_APP_NOTIFICATION_TITLE,
+ .icon_name = "dummy",
+ .info = "Notification is updated",
+ .result = 0,
+ .required_features_count = 1,
+ .features_required = {80}
+ },
+ #endif
+ #ifdef TBT_MODULE_APP_NOTIFICATION_IMAGE
+
+ //Notification
+ {
+ .name = "Notification Image",
+ .parent = "Notification Status",
+ .apptype = TBT_APP_NOTIFICATION_IMAGE,
+ .icon_name = "dummy",
+ .info = "Notification is updated",
+ .result = 0,
+ .required_features_count = 1,
+ .features_required = {80}
+ },
+ #endif
+#endif
+#ifdef TBT_MODULE_CONNECTION
+ #ifdef TBT_MODULE_APP_CONNECTION
+
+ //Connection
+ {
+ .name = "Connection",
+ .parent = "Connection Status",
+ .apptype = TBT_APP_CONNECTION,
+ .icon_name = "dummy",
+ .info = "1.Please Change connection status to flight mode or some other mode<br/>2.Please press back button and again open connection view<br/>3.You will see updated connection status<br/>",
+ .result = 0,
+ },
+ #endif
+#endif
#ifdef TBT_MODULE_SYSTEMSETTINGS
#ifdef TBT_MODULE_APP_SYSTEM_SETTINGS_FONT
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *******************************************************************************/
+/**
+ * @file tbt-connection-view.c
+ * @brief retrieves connection info
+ *
+ * @author Nibha Sharma(nibha.sharma@samsung.com)
+ * @date June, 2016
+ * @bug NA
+ * @credit
+ *
+ */
+
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_CONNECTION
+
+#include <Elementary.h>
+#include <system_info.h>
+
+#include "utils/logger.h"
+#include "utils/config.h"
+#include "utils/ui-utils.h"
+#include "view/tbt-connection-view.h"
+#include "view/tbt-common-view.h"
+#include <net_connection.h>
+
+struct _connection_view
+{
+ common_view* view;
+
+ Evas_Object *connection_label;
+ Evas_Object *capture_btn;
+};
+connection_h g_hConenctionHandle = NULL;
+static char* get_connection_error(connection_error_e err_code);
+static void _app_destroy_cb(void* this);
+static bool is_not_supported = false;
+
+/**
+ * @function connection_view_add
+ * @since_tizen 3.0
+ * @description connection View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return connection_view*
+ */
+connection_view *connection_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+
+ connection_view *this = NULL;
+ this = calloc(1, sizeof(connection_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "2_part_cnt_btn";
+ tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(!this, NULL, "calloc failed");
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ this->connection_label = ui_utils_label_add(this->view->layout, "");
+ elm_label_line_wrap_set(this->connection_label, ELM_WRAP_WORD);
+ int result;
+
+ connection_profile_iterator_h profile_iter;
+ connection_profile_type_e eConnectionProfileType;
+ connection_profile_h profile_h = NULL;
+
+ result = connection_create(&g_hConenctionHandle);
+ RETVM_IF(result != CONNECTION_ERROR_NONE && result!= CONNECTION_ERROR_NOT_SUPPORTED, NULL, "connection_create fail > Error = %s", get_connection_error(result));
+
+ if(result == CONNECTION_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Connection is not supported");
+ RETVM_IF(!this->view, NULL,"Connection is not supported");
+ }
+ if(g_hConenctionHandle != NULL)
+ {
+ result = connection_get_profile_iterator(g_hConenctionHandle, CONNECTION_ITERATOR_TYPE_REGISTERED, &profile_iter);
+ RETVM_IF(result != CONNECTION_ERROR_NONE, NULL, "connection_create fail > Error = %s", get_connection_error(result));
+
+ while ( connection_profile_iterator_has_next(profile_iter) )
+ {
+ result = connection_profile_iterator_next(profile_iter, &profile_h);
+ RETVM_IF(result != CONNECTION_ERROR_NONE, NULL, "connection_create fail > Error = %s", get_connection_error(result));
+
+ result = connection_profile_get_type(profile_h, &eConnectionProfileType);
+ RETVM_IF(result != CONNECTION_ERROR_NONE, NULL, "connection_create fail > Error = %s", get_connection_error(result));
+
+ if ( eConnectionProfileType == CONNECTION_PROFILE_TYPE_CELLULAR )
+ {
+ break;
+ }
+ }
+
+
+ if ( eConnectionProfileType == CONNECTION_PROFILE_TYPE_CELLULAR )
+ {
+ connection_cellular_state_e eFindCellularState = -1;
+
+ result = connection_get_cellular_state(g_hConenctionHandle, &eFindCellularState);
+ RETVM_IF(result != CONNECTION_ERROR_NONE, NULL, "connection_get_cellular_state fail > Error = %s", get_connection_error(result));
+
+ switch(eFindCellularState)
+ {
+ case CONNECTION_CELLULAR_STATE_OUT_OF_SERVICE:
+ ui_utils_label_set_text(this->connection_label, "Out of service ", "left");
+ break;
+
+ case CONNECTION_CELLULAR_STATE_FLIGHT_MODE:
+ ui_utils_label_set_text(this->connection_label, "Flight mode ", "left");
+ break;
+
+ case CONNECTION_CELLULAR_STATE_ROAMING_OFF:
+ ui_utils_label_set_text(this->connection_label, "Roaming is turned off ", "left");
+ break;
+
+ case CONNECTION_CELLULAR_STATE_CALL_ONLY_AVAILABLE:
+ ui_utils_label_set_text(this->connection_label, "Call is only available ", "left");
+ break;
+
+ case CONNECTION_CELLULAR_STATE_AVAILABLE:
+ ui_utils_label_set_text(this->connection_label, "Available but not connected yet ", "left");
+ break;
+
+ case CONNECTION_CELLULAR_STATE_CONNECTED:
+ ui_utils_label_set_text(this->connection_label, "Connected ", "left");
+ break;
+
+ default:
+ ui_utils_label_set_text(this->connection_label, "Unknown status", "left");
+ break;
+
+ }
+ }
+ else
+ {
+ ui_utils_label_set_text(this->connection_label, "Profile is not cellular type", "left");
+ }
+ }
+
+ else
+ {
+ ui_utils_label_set_text(this->connection_label, "Connection is not created", "left");
+ }
+
+ elm_object_part_content_set(this->view->layout, "1cnt", this->connection_label);
+ return this;
+}
+
+/**
+ * @function _app_destroy_cb
+ * @since_tizen 2.3
+ * @description App Destroy Cb
+ * @parameter void*: Void Pointer
+ * @return static void
+ */
+static void _app_destroy_cb(void* this)
+{
+ RETM_IF(NULL == this, "data is NULL");
+
+ int result;
+ connection_view *view = NULL;
+ view = (connection_view*)this;
+ RETM_IF(NULL == view, "view is NULL");
+
+ if(is_not_supported == true)
+ {
+ view->view->tbt_info->result = TBT_INFO_RESULT_NOT_SUPPORTED;
+ elm_genlist_item_update(view->view->item);
+ }
+
+ result = connection_destroy(g_hConenctionHandle);
+ RETM_IF(result != CONNECTION_ERROR_NONE, "connection_destroy fail > Error = %s", get_connection_error(result));
+
+ SAFE_DELETE(view->view);
+ SAFE_DELETE(view);
+}
+
+/**
+ * @function get_connection_error
+ * @since_tizen 3.0
+ * @description Get connection Error
+ * @parameter connection_error_e err_code
+ * @return char*
+ */
+static char* get_connection_error(connection_error_e err_code)
+{
+ char* err_msg;
+
+ switch (err_code) {
+ case CONNECTION_ERROR_NONE:
+ err_msg = "CONNECTION_ERROR_NONE";
+ break;
+ case CONNECTION_ERROR_INVALID_PARAMETER:
+ err_msg = "CONNECTION_ERROR_INVALID_PARAMETER";
+ break;
+ case CONNECTION_ERROR_OUT_OF_MEMORY:
+ err_msg = "CONNECTION_ERROR_OUT_OF_MEMORY";
+ break;
+ case CONNECTION_ERROR_INVALID_OPERATION:
+ err_msg = "CONNECTION_ERROR_INVALID_OPERATION";
+ break;
+ case CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED:
+ err_msg = "CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED";
+ break;
+ case CONNECTION_ERROR_OPERATION_FAILED:
+ err_msg = "CONNECTION_ERROR_OPERATION_FAILED";
+ break;
+ case CONNECTION_ERROR_ITERATOR_END:
+ err_msg = "CONNECTION_ERROR_ITERATOR_END";
+ break;
+ case CONNECTION_ERROR_NO_CONNECTION:
+ err_msg = "CONNECTION_ERROR_NO_CONNECTION";
+ break;
+ case CONNECTION_ERROR_NOW_IN_PROGRESS:
+ err_msg = "CONNECTION_ERROR_NOW_IN_PROGRESS";
+ break;
+ case CONNECTION_ERROR_ALREADY_EXISTS:
+ err_msg = "CONNECTION_ERROR_ALREADY_EXISTS";
+ break;
+ case CONNECTION_ERROR_OPERATION_ABORTED:
+ err_msg = "CONNECTION_ERROR_OPERATION_ABORTED";
+ break;
+ case CONNECTION_ERROR_DHCP_FAILED:
+ err_msg = "CONNECTION_ERROR_DHCP_FAILED";
+ break;
+ case CONNECTION_ERROR_INVALID_KEY:
+ err_msg = "CONNECTION_ERROR_INVALID_KEY";
+ break;
+ case CONNECTION_ERROR_NO_REPLY:
+ err_msg = "CONNECTION_ERROR_NO_REPLY";
+ break;
+ case CONNECTION_ERROR_PERMISSION_DENIED:
+ err_msg = "CONNECTION_ERROR_PERMISSION_DENIED";
+ break;
+ case CONNECTION_ERROR_NOT_SUPPORTED:
+ err_msg = "CONNECTION_ERROR_NOT_SUPPORTED";
+ break;
+ default:
+ err_msg = "Unknown Error";
+ break;
+
+ }
+ return err_msg;
+}
+
+
+
+#endif
#include "view/tbt-ime-view.h"
#include "view/tbt-widget-view.h"
#include "view/tbt-bluetoothle-view.h"
+#include "view/tbt-storage-view.h"
+#include "view/tbt-radio-view.h"
+#include "view/tbt-sound-manager-view.h"
+#include "view/tbt-media-key-view.h"
+#include "view/tbt-package-manager-view.h"
+#include "view/tbt-notification-view.h"
+#include "view/tbt-connection-view.h"
#include "view/tbt-systemsettings-view.h"
//#include "view/tbt-contacts-view.h"
#endif
#ifdef TBT_MODULE_RUNTIME
- case TBT_APP_RUNTIME_INFO:
+ case TBT_APP_AUDIO_JACK:
runtimeinfo_view_add(view->navi, info, it);
break;
+ case TBT_APP_KEY_VIBRATION:
+ runtimeinfo_view_add(view->navi, info, it);
+ break;
+ case TBT_APP_BATTERY:
+ runtimeinfo_view_add(view->navi, info, it);
+ break;
+ case TBT_APP_GPS_STATUS:
+ runtimeinfo_view_add(view->navi, info, it);
+ break;
+ case TBT_APP_USB_CONNECTED:
+ runtimeinfo_view_add(view->navi, info, it);
+ break;
+ case TBT_APP_BLUETOOTH_ENABLED:
+ runtimeinfo_view_add(view->navi, info, it);
+ break;
+ case TBT_APP_AUTO_ROTATION_ENABLED:
+ runtimeinfo_view_add(view->navi, info, it);
+ break;
+ case TBT_APP_LOCATION_SERVICE_ENABLED:
+ runtimeinfo_view_add(view->navi, info, it);
+ break;
+ case TBT_APP_WIFI_HOTSPOT_ENABLED:
+ runtimeinfo_view_add(view->navi, info, it);
+ break;
#endif
#ifdef TBT_MODULE_FEATURE
feature_view_add(view->navi, info, it);
break;
#endif
-
+ #ifdef TBT_MODULE_STORAGE
+ case TBT_APP_STORAGE:
+ storage_view_add(view->navi, info, it);
+ break;
+ #endif
+ #ifdef TBT_MODULE_RADIO
+ case TBT_APP_RADIO:
+ radio_view_add(view->navi, info, it);
+ break;
+ #endif
+ #ifdef TBT_MODULE_SOUND_MANAGER
+ case TBT_APP_SOUND_MANAGER:
+ soundmanager_view_add(view->navi, info, it);
+ break;
+ case TBT_APP_SOUND_MANAGER_DEVICE:
+ soundmanager_view_add(view->navi, info, it);
+ break;
+ #endif
+ #ifdef TBT_MODULE_MEDIA_KEY
+ case TBT_APP_MEDIA_KEY:
+ mediakey_view_add(view->navi, info, it);
+ break;
+ #endif
+ #ifdef TBT_MODULE_PACKAGE_MANAGER
+ case TBT_APP_PACKAGE_MANAGER:
+ packagemanager_view_add(view->navi, info, it);
+ break;
+ #endif
+ #ifdef TBT_MODULE_NOTIFICATION
+ case TBT_APP_NOTIFICATION_TEXT:
+ notification_view_add(view->navi, info, it);
+ break;
+ case TBT_APP_NOTIFICATION_TIME:
+ notification_view_add(view->navi, info, it);
+ break;
+ case TBT_APP_NOTIFICATION_TITLE:
+ notification_view_add(view->navi, info, it);
+ break;
+ case TBT_APP_NOTIFICATION_IMAGE:
+ notification_view_add(view->navi, info, it);
+ break;
+ #endif
+ #ifdef TBT_MODULE_CONNECTION
+ case TBT_APP_CONNECTION:
+ connection_view_add(view->navi, info, it);
+ break;
+ #endif
#ifdef TBT_MODULE_SYSTEMSETTINGS
case TBT_APP_SYSTEM_SETTINGS_FONT:
systemsettings_view_add(view->navi, info, it);
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *******************************************************************************/
+/**
+ * @file tbt-mediakey-view.c
+ * @brief retrieves mediakey info
+ *
+ * @author Nibha Sharma(nibha.sharma@samsung.com)
+ * @date June, 2016
+ * @bug none
+ * @credit
+ *
+ */
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_MEDIA_KEY
+
+#include <Elementary.h>
+#include <locations.h>
+
+#include "utils/logger.h"
+#include "utils/config.h"
+#include "utils/ui-utils.h"
+#include "view/tbt-media-key-view.h"
+#include "view/tbt-common-view.h"
+
+struct _mediakey_view
+{
+ common_view* view;
+
+ Evas_Object *mediakey_label;
+ Evas_Object *mediakey2_label;
+
+};
+
+static void _app_destroy_cb(void* this);
+static void _media_key_event_cb(media_key_e key, media_key_event_e status, void *user_data);
+
+/**
+ * @function get_mediakey_type_error
+ * @since_tizen 3.0
+ * @description Get mediakey Error
+ * @parameter int: Int
+ * @return char*
+ */
+char* get_mediakey_type_error(int ret)
+{
+ char* err_msg = NULL;
+ switch (ret) {
+ case MEDIA_KEY_ERROR_NONE:
+ err_msg = "MEDIA_KEY_ERROR_NONE";
+ break;
+ case MEDIA_KEY_ERROR_INVALID_PARAMETER:
+ err_msg = "MEDIA_KEY_ERROR_INVALID_PARAMETER";
+ break;
+ case MEDIA_KEY_ERROR_OPERATION_FAILED:
+ err_msg = "MEDIA_KEY_ERROR_OPERATION_FAILED";
+ break;
+ default:
+ err_msg = "Unknown Error";
+ break;
+ }
+
+ return err_msg;
+}
+
+/**
+ * @function mediakey_view_add
+ * @since_tizen 3.0
+ * @description mediakey View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return mediakey_view*
+ */
+mediakey_view *mediakey_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+ int ret;
+ mediakey_view *this = NULL;
+ this = calloc(1, sizeof(mediakey_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "3_part_cnt_cnt_btn";
+ tbt_info->layout_file = get_edje_path("3_part_cnt2.75_cnt_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ ret = media_key_reserve(_media_key_event_cb,this);
+ RETVM_IF(ret != MEDIA_KEY_ERROR_NONE, NULL, "media_key_reserve failed : %s", get_mediakey_type_error(ret));
+
+ this->mediakey_label = ui_utils_label_add(this->view->layout, "Status[Press audiojack key] ");
+ elm_label_line_wrap_set(this->mediakey_label, ELM_WRAP_WORD);
+
+ this->mediakey2_label = ui_utils_label_add(this->view->layout, "Type[Press audiojack key]");
+ elm_label_line_wrap_set(this->mediakey2_label, ELM_WRAP_WORD);
+
+ elm_object_part_content_set(this->view->layout, "1cnt", this->mediakey_label);
+ elm_object_part_content_set(this->view->layout, "1cnt_2cnt", this->mediakey2_label);
+
+ return this;
+}
+
+
+/**
+ * @function _app_destroy_cb
+ * @since_tizen 2.3
+ * @description App Destroy Cb
+ * @parameter void*: Void Pointer
+ * @return static void
+ */
+static void _app_destroy_cb(void* this)
+{
+
+ RETM_IF(NULL == this, "data is NULL");
+
+ int result;
+ mediakey_view *view = NULL;
+ view = (mediakey_view*)this;
+ RETM_IF(NULL == view, "view is NULL");
+
+ result = media_key_release();
+ RETM_IF(MEDIA_KEY_ERROR_NONE!=result, "media_key_release failed:%s", get_mediakey_type_error(result));
+
+ SAFE_DELETE(view->view);
+ SAFE_DELETE(view);
+}
+
+
+/**
+ * @function _media_key_event_cb
+ * @since_tizen 3.0
+ * @description media key event Cb
+ * @parameter media_key_e key, media_key_event_e status, void *user_data
+ * @return void
+ */
+static void _media_key_event_cb(media_key_e key, media_key_event_e status, void *user_data)
+{
+
+ RETM_IF(NULL == user_data, "user_data is null");
+ mediakey_view *this = NULL;
+ this = (mediakey_view*) user_data;
+ RETM_IF(NULL == this, "view is NULL");
+
+ DBG("value: %d", status);
+
+ switch (status)
+ {
+ case MEDIA_KEY_STATUS_PRESSED:
+ ui_utils_label_set_text(this->mediakey_label, "Pressed status", "left");
+ break;
+ case MEDIA_KEY_STATUS_RELEASED:
+ ui_utils_label_set_text(this->mediakey_label, "Released status", "left");
+ break;
+ case MEDIA_KEY_STATUS_UNKNOWN:
+ ui_utils_label_set_text(this->mediakey_label, "Unknown status", "left");
+ break;
+ default:
+ ui_utils_label_set_text(this->mediakey_label, "unknown state", "left");
+ break;
+ }
+
+ DBG("value: %d", key);
+ switch (key)
+ {
+ case MEDIA_KEY_PLAY:
+ ui_utils_label_set_text(this->mediakey2_label, "Play key", "left");
+ break;
+ case MEDIA_KEY_STOP:
+ ui_utils_label_set_text(this->mediakey2_label, "Stop key", "left");
+ break;
+ case MEDIA_KEY_PAUSE:
+ ui_utils_label_set_text(this->mediakey2_label, "Pause key", "left");
+ break;
+ case MEDIA_KEY_PREVIOUS:
+ ui_utils_label_set_text(this->mediakey2_label, "Previous key", "left");
+ break;
+ case MEDIA_KEY_NEXT:
+ ui_utils_label_set_text(this->mediakey2_label, "Next key", "left");
+ break;
+ case MEDIA_KEY_FASTFORWARD:
+ ui_utils_label_set_text(this->mediakey2_label, "Fastforward key", "left");
+ break;
+ case MEDIA_KEY_REWIND:
+ ui_utils_label_set_text(this->mediakey2_label, "Rewind key", "left");
+ break;
+ case MEDIA_KEY_PLAYPAUSE:
+ ui_utils_label_set_text(this->mediakey2_label, "Playpause key", "left");
+ break;
+ case MEDIA_KEY_MEDIA:
+ ui_utils_label_set_text(this->mediakey2_label, "Media key for earjack", "left");
+ break;
+ case MEDIA_KEY_UNKNOWN:
+ ui_utils_label_set_text(this->mediakey2_label, "Unknown key", "left");
+ break;
+ default:
+ ui_utils_label_set_text(this->mediakey_label, "unknown state", "left");
+ break;
+ }
+ return ;
+}
+
+#endif
return error;
}
+/**
+ * @function get_nfc_error
+ * @since_tizen 2.3
+ * @description Get Nfc Error
+ * @parameter nfc_error_e: Nfc Error E
+ * @return char*
+ */
+char* get_nfc_string_error(nfc_error_e error_code)
+{
+ char* error;
+
+switch(error_code)
+{
+ case NFC_ERROR_NONE:
+ error = "Successful";
+ break;
+ case NFC_ERROR_OUT_OF_MEMORY:
+ error = "Out of memory ";
+ break;
+ case NFC_ERROR_OPERATION_FAILED:
+ error = "Operation failed ";
+ break;
+ case NFC_ERROR_INVALID_PARAMETER:
+ error = "Invalid parameter ";
+ break;
+ case NFC_ERROR_INVALID_NDEF_MESSAGE:
+ error = "Invalid NDEF message ";
+ break;
+ case NFC_ERROR_INVALID_RECORD_TYPE:
+ error = "Invalid record type ";
+ break;
+ case NFC_ERROR_TIMED_OUT:
+ error = "Timeout error, no answer ";
+ break;
+ case NFC_ERROR_DEVICE_BUSY:
+ error = "Previous operation is not finished still busy ";
+ break;
+ case NFC_ERROR_NO_DEVICE:
+ error = "no device ";
+ break;
+ case NFC_ERROR_NOT_ACTIVATED:
+ error = "NFC is not activated ";
+ break;
+ case NFC_ERROR_NOT_SUPPORTED:
+ error = "Not supported ";
+ break;
+ case NFC_ERROR_ALREADY_ACTIVATED:
+ error = "Already activated ";
+ break;
+ case NFC_ERROR_ALREADY_DEACTIVATED:
+ error = "Already deactivated ";
+ break;
+ case NFC_ERROR_READ_ONLY_NDEF:
+ error = "Read only tag ";
+ break;
+ case NFC_ERROR_NO_SPACE_ON_NDEF:
+ error = "No enough space on tag ";
+ break;
+ case NFC_ERROR_NO_NDEF_MESSAGE:
+ error = "No NDEF Message on Tag ";
+ break;
+ case NFC_ERROR_NOT_NDEF_FORMAT:
+ error = "Not NDEF format Tag ";
+ break;
+ case NFC_ERROR_SECURITY_RESTRICTED:
+ error = "Restricted by access control ";
+ break;
+ case NFC_ERROR_PERMISSION_DENIED:
+ error = "Restricted by Smack";
+ break;
+ case NFC_ERROR_ILLEGAL_STATE:
+ error = "The state is wrong";
+ break;
+ case NFC_ERROR_NOT_INITIALIZED:
+ error = "NFC is not initialized";
+ break;
+ case NFC_ERROR_TAG_NOT_SUPPORTED:
+ error = "Tag is not supported";
+ break;
+ case NFC_ERROR_AID_ALREADY_REGISTERED:
+ error = "AID already registered";
+ }
+
+ return error;
+}
/**
* @function _nfc_activation_changed_cb
elm_list_go(this->nfc_list);
evas_object_show(this->nfc_list);
}
-
+ DBG("NFC Discovery Attach");
+ ui_utils_label_set_text(this->nfc_label, "NFC Discovery Attach", "left");
+ }
+ else if(type == NFC_DISCOVERED_TYPE_DETACHED)
+ {
+ DBG("NFC Discovery Detach");
+ this->nfc_label = ui_utils_label_add(this->view->layout, "NFC Discovery Detach");
+ elm_object_part_content_set(this->view->layout, "nfc_text", this->nfc_label);
+ this->nfc_list = elm_list_add(this->view->layout);
+ evas_object_data_set(this->nfc_list, "nfc_view", this);
+ elm_object_part_content_set(this->view->layout, "nfc_list", this->nfc_list);
+ ui_utils_show_toast("NFC Discovery Detach", this->view->layout, 3);
}
}
}
if(this->view->tbt_info->apptype == TBT_APP_NFC_P2P)
{
- DBG("Inside TBT_APP_NFC_P2P");
- if(is_tab_1_clicked == true)
+ if(type == NFC_DISCOVERED_TYPE_ATTACHED)
{
- DBG("Inside server");
- result = nfc_p2p_set_data_received_cb(this->target, _nfc_p2p_data_received_cb, this);
-// result = nfc_snep_register_server("default", 4, _nfc_snep_event_cb, this);
-// DBG("nfc_snep_register_server %s", get_nfc_error(result));
-// RETM_IF(result != NFC_ERROR_NONE, "nfc_snep_register_server: %s", get_nfc_error(result));
-//
-// result = nfc_snep_start_server(this->target, "default", 4, _nfc_snep_event_cb, this);
-// RETM_IF(result != NFC_ERROR_NONE, "nfc_snep_start_server: %s", get_nfc_error(result));
+ DBG("Inside TBT_APP_NFC_P2P");
+ if(is_tab_1_clicked == true)
+ {
+ DBG("Inside server");
+ result = nfc_p2p_set_data_received_cb(this->target, _nfc_p2p_data_received_cb, this);
+ // result = nfc_snep_register_server("default", 4, _nfc_snep_event_cb, this);
+ // DBG("nfc_snep_register_server %s", get_nfc_error(result));
+ // RETM_IF(result != NFC_ERROR_NONE, "nfc_snep_register_server: %s", get_nfc_error(result));
+ //
+ // result = nfc_snep_start_server(this->target, "default", 4, _nfc_snep_event_cb, this);
+ // RETM_IF(result != NFC_ERROR_NONE, "nfc_snep_start_server: %s", get_nfc_error(result));
+ }
+ else if(is_tab_2_clicked == true)
+ {
+ nfc_ndef_message_h message = create_ndef_message();
+ nfc_p2p_send(this->target, message, _nfc_p2p_send_completed_cb, this);
+ // result = nfc_snep_start_client(this->target, "urn:nfc:sn:snep", 4, _nfc_snep_event_cb, this);
+ // RETM_IF(result != NFC_ERROR_NONE, "nfc_snep_start_client: %s", get_nfc_error(result));
+ }
+ DBG("NFC Discovery Attach");
+ ui_utils_label_set_text(this->nfc_label, "NFC Discovery Attach", "left");
}
- else if(is_tab_2_clicked == true)
+ else
{
- nfc_ndef_message_h message = create_ndef_message();
- nfc_p2p_send(this->target, message, _nfc_p2p_send_completed_cb, this);
-// result = nfc_snep_start_client(this->target, "urn:nfc:sn:snep", 4, _nfc_snep_event_cb, this);
-// RETM_IF(result != NFC_ERROR_NONE, "nfc_snep_start_client: %s", get_nfc_error(result));
+ DBG("NFC Discovery Detach");
+ this->nfc_label = ui_utils_label_add(this->view->layout, "NFC Discovery Detach");
+ elm_object_part_content_set(this->view->layout, "nfc_text", this->nfc_label);
+ this->nfc_list = elm_list_add(this->view->layout);
+ evas_object_data_set(this->nfc_list, "nfc_view", this);
+ elm_object_part_content_set(this->view->layout, "nfc_list", this->nfc_list);
+ ui_utils_show_toast("NFC Discovery Detach", this->view->layout, 3);
}
this = (nfc_view*)user_data;
RETM_IF(NULL == this, "view is NULL");
- char* fmt_str = NULL;
-
- fmt_str = nfc_util_itoa("Transceive Data: %s size: %d", buffer, buffer_size);
- elm_list_item_append(this->nfc_list, fmt_str, NULL, NULL, NULL, NULL);
- SAFE_DELETE(fmt_str);
+ if(result != NFC_ERROR_NONE)
+ ui_utils_show_toast(get_nfc_string_error(result), this->view->layout, 3);
+ char* fmt_str = NULL;
+ fmt_str = nfc_util_itoa("Transceive Data: %s size: %d", buffer, buffer_size);
+ elm_list_item_append(this->nfc_list, fmt_str, NULL, NULL, NULL, NULL);
+ SAFE_DELETE(fmt_str);
}
if(result == NFC_ERROR_NONE)
{
- //elm_object_text_set(this->nfc_label, "Write Completed Successfully");
- ui_utils_label_set_text(this->nfc_label, "Write Completed Successfully", "center");
+ elm_object_text_set(this->nfc_label, "Write Completed Successfully");
}
else
{
- //elm_object_text_set(this->nfc_label, "Write Error");
- ui_utils_label_set_text(this->nfc_label, "Write Error", "left");
+ elm_object_text_set(this->nfc_label, get_nfc_string_error(result));
}
}
elm_list_clear(this->nfc_list);
evas_object_hide(this->control);
elm_object_part_content_unset(this->view->layout, "controlr_part");
- //elm_object_text_set(this->nfc_label, "NFC Read");
- ui_utils_label_set_text(this->nfc_label, "NFC Read", "left");
+ elm_object_text_set(this->nfc_label, "NFC Read");
}
elm_list_clear(this->nfc_list);
- //elm_object_text_set(this->nfc_label, "NFC Write");
- ui_utils_label_set_text(this->nfc_label, "NFC Write", "left");
+ elm_object_text_set(this->nfc_label, "NFC Write");
}
this = (nfc_view*)user_data;
RETM_IF(NULL == this, "view is NULL");
- ret = nfc_ndef_message_get_record_count(message, &count);
- RETM_IF(ret != NFC_ERROR_NONE, "nfc_ndef_message_get_record_count failed with error: %s", get_nfc_error(ret));
+ if(result != NFC_ERROR_NONE)
+ {
+ ui_utils_show_toast(get_nfc_string_error(result), this->view->layout, 3);
+ }
+ ret = nfc_ndef_message_get_record_count(message, &count);
+ RETM_IF(ret != NFC_ERROR_NONE, "nfc_ndef_message_get_record_count failed with error: %s", get_nfc_error(ret));
char* fmt_str = NULL;
fmt_str = nfc_util_itoa("NDEF Record Count: %d", count);
{
ui_utils_label_set_text(this->nfc_label, "Data Sent Successfully", "left");
}
+ else
+ {
+ ui_utils_label_set_text(this->nfc_label, get_nfc_string_error(result), "left");
+ }
}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *******************************************************************************/
+/**
+ * @file tbt-notification-view.c
+ * @brief retrieves notification info
+ *
+ * @author Nibha Sharma(nibha.sharma@samsung.com)
+ * @date June, 2016
+ * @bug none
+ * @credit
+ *
+ */
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_NOTIFICATION
+
+#include <Elementary.h>
+#include <locations.h>
+#include <time.h>
+
+#include "utils/logger.h"
+#include "utils/config.h"
+#include "utils/ui-utils.h"
+#include "view/tbt-notification-view.h"
+#include "view/tbt-common-view.h"
+
+struct _notification_view
+{
+ common_view* view;
+
+ Evas_Object *notification_label;
+
+};
+
+static void _app_destroy_cb(void* this);
+
+notification_h g_NotificationHandle;
+
+/**
+ * @function get_notification_error
+ * @since_tizen 3.0
+ * @description Get notification Error
+ * @parameter int: Int
+ * @return char*
+ */
+char* get_notification_error(int ret)
+{
+ char* err_msg = NULL;
+ switch (ret) {
+ case NOTIFICATION_ERROR_NONE:
+ err_msg = "NOTIFICATION_ERROR_NONE";
+ break;
+ case NOTIFICATION_ERROR_INVALID_PARAMETER:
+ err_msg = "NOTIFICATION_ERROR_INVALID_PARAMETER";
+ break;
+ case NOTIFICATION_ERROR_OUT_OF_MEMORY:
+ err_msg = "NOTIFICATION_ERROR_OUT_OF_MEMORY";
+ break;
+ case NOTIFICATION_ERROR_FROM_DB:
+ err_msg = " NOTIFICATION_ERROR_FROM_DB";
+ break;
+ case NOTIFICATION_ERROR_ALREADY_EXIST_ID:
+ err_msg = " NOTIFICATION_ERROR_ALREADY_EXIST_ID";
+ break;
+ case NOTIFICATION_ERROR_FROM_DBUS:
+ err_msg = "NOTIFICATION_ERROR_FROM_DBUS";
+ break;
+ case NOTIFICATION_ERROR_NOT_EXIST_ID:
+ err_msg = "NOTIFICATION_ERROR_NOT_EXIST_ID";
+ break;
+ case NOTIFICATION_ERROR_IO_ERROR:
+ err_msg = "NOTIFICATION_ERROR_IO_ERROR";
+ break;
+ case NOTIFICATION_ERROR_SERVICE_NOT_READY:
+ err_msg = "NOTIFICATION_ERROR_SERVICE_NOT_READY";
+ break;
+ case NOTIFICATION_ERROR_PERMISSION_DENIED:
+ err_msg = "NOTIFICATION_ERROR_PERMISSION_DENIED";
+ break;
+ default:
+ err_msg = "Unknown Error";
+ break;
+ }
+
+ return err_msg;
+}
+
+/**
+ * @function notification_view_add
+ * @since_tizen 3.0
+ * @description Notification View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return notification_view*
+ */
+notification_view *notification_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+ int ret;
+ notification_view *this = NULL;
+ this = calloc(1, sizeof(notification_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "2_part_cnt_btn";
+ tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ g_NotificationHandle = notification_create(NOTIFICATION_TYPE_NOTI);
+
+ if(this->view->tbt_info->apptype == TBT_APP_NOTIFICATION_TITLE)
+ {
+ ret = notification_set_text(g_NotificationHandle,NOTIFICATION_TEXT_TYPE_TITLE, "IDS_APP_BODY_IM_TITLE", "I'm Title", NOTIFICATION_VARIABLE_TYPE_NONE);
+ RETVM_IF(ret != NOTIFICATION_ERROR_NONE, NULL, "package_manager_set_event_cb failed : %s", get_notification_error(ret));
+
+ ret = notification_post(g_NotificationHandle);
+ RETVM_IF(ret != NOTIFICATION_ERROR_NONE, NULL, "notification_post failed : %s", get_notification_error(ret));
+
+ return this;
+ }
+ else if (this->view->tbt_info->apptype == TBT_APP_NOTIFICATION_TEXT)
+ {
+ ret = notification_status_message_post("Hello World!!!");
+ RETVM_IF(ret != NOTIFICATION_ERROR_NONE, NULL, "notification_status_message_post failed : %s", get_notification_error(ret));
+ return this;
+ }
+ else if (this->view->tbt_info->apptype == TBT_APP_NOTIFICATION_TIME)
+ {
+ ret = notification_set_time_to_text(g_NotificationHandle,NOTIFICATION_TEXT_TYPE_CONTENT, time(NULL));
+ RETVM_IF(ret != NOTIFICATION_ERROR_NONE, NULL, "notification_set_time failed : %s", get_notification_error(ret));
+
+ ret = notification_post(g_NotificationHandle);
+ RETVM_IF(ret != NOTIFICATION_ERROR_NONE, NULL, "notification_post failed : %s", get_notification_error(ret));
+
+ return this;
+
+ }
+ else if (this->view->tbt_info->apptype == TBT_APP_NOTIFICATION_IMAGE)
+ {
+ char image_path[128] = {'\0'};
+ snprintf(image_path, sizeof(image_path), "%simages/%s",app_get_resource_path(),"dial.png");
+
+ DBG("%s",image_path);
+
+ ret = notification_set_image(g_NotificationHandle,NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR ,image_path);
+ RETVM_IF(ret != NOTIFICATION_ERROR_NONE, NULL, "notification_set_image failed : %s", get_notification_error(ret));
+
+ ret = notification_post(g_NotificationHandle);
+ RETVM_IF(ret != NOTIFICATION_ERROR_NONE, NULL, "notification_post failed : %s", get_notification_error(ret));
+
+ return this;
+ }
+ return this;
+}
+
+
+/**
+ * @function _app_destroy_cb
+ * @since_tizen 2.3
+ * @description App Destroy Cb
+ * @parameter void*: Void Pointer
+ * @return static void
+ */
+static void _app_destroy_cb(void* this)
+{
+
+ RETM_IF(NULL == this, "data is NULL");
+
+ int result;
+ notification_view *view = NULL;
+ view = (notification_view*)this;
+ RETM_IF(NULL == view, "view is NULL");
+
+ result = notification_delete(g_NotificationHandle);
+ RETM_IF(result != NOTIFICATION_ERROR_NONE, "notification_delete fail > Error = %s", get_notification_error(result));
+
+ result = notification_free(g_NotificationHandle);
+ RETM_IF(result != NOTIFICATION_ERROR_NONE, "notification_free fail > Error = %s", get_notification_error(result));
+
+ SAFE_DELETE(view->view);
+ SAFE_DELETE(view);
+}
+#endif
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *******************************************************************************/
+/**
+ * @file tbt-packagemanager-view.c
+ * @brief retrieves packagemanager info
+ *
+ * @author Nibha Sharma(nibha.sharma@samsung.com)
+ * @date June, 2016
+ * @bug none
+ * @credit
+ *
+ */
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_PACKAGE_MANAGER
+
+#include <Elementary.h>
+#include <locations.h>
+
+#include "utils/logger.h"
+#include "utils/config.h"
+#include "utils/ui-utils.h"
+#include "view/tbt-package-manager-view.h"
+#include "view/tbt-common-view.h"
+
+struct _packagemanager_view
+{
+ common_view* view;
+
+ Evas_Object *packagemanager_label;
+ Evas_Object *packagemanagerstate_label;
+
+};
+
+static void _app_destroy_cb(void* this);
+static void _package_manager_event_cb(const char *type, const char *package, package_manager_event_type_e event_type, package_manager_event_state_e event_state, int progress, package_manager_error_e error, void *user_data);
+
+package_manager_h g_pstPkgMngr;
+
+/**
+ * @function get_package_manager_error
+ * @since_tizen 3.0
+ * @description Get packagemanager Error
+ * @parameter int: Int
+ * @return char*
+ */
+char* get_package_manager_error(int ret)
+{
+ char* err_msg = NULL;
+ switch (ret) {
+ case PACKAGE_MANAGER_ERROR_NONE:
+ err_msg = "PACKAGE_MANAGER_ERROR_NONE";
+ break;
+ case PACKAGE_MANAGER_ERROR_INVALID_PARAMETER:
+ err_msg = "PACKAGE_MANAGER_ERROR_INVALID_PARAMETER";
+ break;
+ case PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY:
+ err_msg = "PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY";
+ break;
+ case PACKAGE_MANAGER_ERROR_IO_ERROR:
+ err_msg = "PACKAGE_MANAGER_ERROR_IO_ERROR";
+ break;
+ case PACKAGE_MANAGER_ERROR_PERMISSION_DENIED:
+ err_msg = "PACKAGE_MANAGER_ERROR_PERMISSION_DENIED";
+ break;
+ default:
+ err_msg = "Unknown Error";
+ break;
+ }
+
+ return err_msg;
+}
+
+/**
+ * @function packagemanager_view_add
+ * @since_tizen 3.0
+ * @description Package Manager View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return packagemanager_view*
+ */
+packagemanager_view *packagemanager_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+ int ret;
+ packagemanager_view *this = NULL;
+ this = calloc(1, sizeof(packagemanager_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "3_part_cnt_cnt_btn";
+ tbt_info->layout_file = get_edje_path("3_part_cnt2.75_cnt_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ ret = package_manager_create(&g_pstPkgMngr);
+ RETVM_IF(ret != PACKAGE_MANAGER_ERROR_NONE, NULL, "package_manager_create failed : %s", get_package_manager_error(ret));
+
+ ret = package_manager_set_event_cb(g_pstPkgMngr,_package_manager_event_cb, this);
+ RETVM_IF(ret != PACKAGE_MANAGER_ERROR_NONE, NULL, "package_manager_set_event_cb failed : %s", get_package_manager_error(ret));
+
+ this->packagemanager_label = ui_utils_label_add(this->view->layout, "Package Status:Install/Uninstall/Update ");
+ elm_label_line_wrap_set(this->packagemanager_label, ELM_WRAP_WORD);
+
+ this->packagemanagerstate_label = ui_utils_label_add(this->view->layout, "State: No Progress");
+ elm_label_line_wrap_set(this->packagemanagerstate_label, ELM_WRAP_WORD);
+
+ elm_object_part_content_set(this->view->layout, "1cnt", this->packagemanager_label);
+ elm_object_part_content_set(this->view->layout, "1cnt_2cnt", this->packagemanagerstate_label);
+
+ return this;
+}
+
+
+/**
+ * @function _app_destroy_cb
+ * @since_tizen 2.3
+ * @description App Destroy Cb
+ * @parameter void*: Void Pointer
+ * @return static void
+ */
+static void _app_destroy_cb(void* this)
+{
+
+ RETM_IF(NULL == this, "data is NULL");
+
+ int result;
+ packagemanager_view *view = NULL;
+ view = (packagemanager_view*)this;
+ RETM_IF(NULL == view, "view is NULL");
+
+ result = package_manager_destroy(g_pstPkgMngr);
+ RETM_IF(result != PACKAGE_MANAGER_ERROR_NONE, "package_manager_destroy fail > Error = %s", get_package_manager_error(result));
+
+ SAFE_DELETE(view->view);
+ SAFE_DELETE(view);
+}
+
+
+/**
+ * @function _package_manager_event_cb
+ * @since_tizen 3.0
+ * @description package manager event Cb
+ * @parameter const char *type, const char *package, package_manager_event_type_e event_type, package_manager_event_state_e event_state, int progress, package_manager_error_e error, void *user_data
+ * @return void
+ */
+static void _package_manager_event_cb(const char *type, const char *package, package_manager_event_type_e event_type, package_manager_event_state_e event_state, int progress, package_manager_error_e error, void *user_data)
+{
+
+ RETM_IF(NULL == user_data, "user_data is null");
+ packagemanager_view *this = NULL;
+ this = (packagemanager_view*) user_data;
+ RETM_IF(NULL == this, "view is NULL");
+
+ DBG("value: %d", event_type);
+
+ switch (event_type)
+ {
+ case PACKAGE_MANAGER_EVENT_TYPE_INSTALL:
+ ui_utils_label_set_text(this->packagemanager_label, "Install event type ", "left");
+ break;
+ case PACKAGE_MANAGER_EVENT_TYPE_UNINSTALL:
+ ui_utils_label_set_text(this->packagemanager_label, "Uninstall event type", "left");
+ break;
+ case PACKAGE_MANAGER_EVENT_TYPE_UPDATE:
+ ui_utils_label_set_text(this->packagemanager_label, "Update event type", "left");
+ break;
+ default:
+ ui_utils_label_set_text(this->packagemanager_label, "unknown state", "left");
+ break;
+ }
+ switch(event_state)
+ {
+ case PACKAGE_MANAGER_EVENT_STATE_STARTED:
+ ui_utils_label_set_text(this->packagemanagerstate_label, "Started event state", "left");
+ break;
+ case PACKAGE_MANAGER_EVENT_STATE_PROCESSING:
+ ui_utils_label_set_text(this->packagemanagerstate_label, "Processing event state", "left");
+ break;
+ case PACKAGE_MANAGER_EVENT_STATE_COMPLETED:
+ ui_utils_label_set_text(this->packagemanagerstate_label, "Completed event state", "left");
+ break;
+ case PACKAGE_MANAGER_EVENT_STATE_FAILED:
+ ui_utils_label_set_text(this->packagemanagerstate_label, "Failed event state", "left");
+ break;
+ default:
+ ui_utils_label_set_text(this->packagemanagerstate_label, "unknown state", "left");
+ break;
+ }
+ return ;
+}
+
+#endif
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *******************************************************************************/
+/**
+ * @file tbt-radio-view.c
+ * @brief retrieves radio info
+ *
+ * @author Nibha Sharma(nibha.sharma@samsung.com)
+ * @date June, 2016
+ * @bug none
+ * @credit
+ *
+ */
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_RADIO
+
+#include <Elementary.h>
+#include <locations.h>
+
+#include "utils/logger.h"
+#include "utils/config.h"
+#include "utils/ui-utils.h"
+#include "view/tbt-radio-view.h"
+#include "view/tbt-common-view.h"
+
+struct _radio_view
+{
+ common_view* view;
+
+ Evas_Object *radio_label;
+};
+
+static void _app_destroy_cb(void* this);
+static void _radio_interrupted_cb(radio_interrupted_code_e code, void *user_data);
+
+radio_h g_pstRadio;
+static bool is_not_supported = false;
+
+/**
+ * @function get_radio_type_error
+ * @since_tizen 3.0
+ * @description Get radio Error
+ * @parameter int: Int
+ * @return char*
+ */
+char* get_radio_type_error(int ret)
+{
+ char* err_msg = NULL;
+ switch (ret) {
+ case RADIO_ERROR_NONE:
+ err_msg = "RADIO_ERROR_NONE";
+ break;
+ case RADIO_ERROR_INVALID_PARAMETER:
+ err_msg = "RADIO_ERROR_INVALID_PARAMETER";
+ break;
+ case RADIO_ERROR_INVALID_OPERATION:
+ err_msg = "RADIO_ERROR_INVALID_OPERATION";
+ break;
+ case RADIO_ERROR_OUT_OF_MEMORY:
+ err_msg = "RADIO_ERROR_OUT_OF_MEMORY";
+ break;
+ case RADIO_ERROR_INVALID_STATE:
+ err_msg = "RADIO_ERROR_INVALID_STATE";
+ break;
+ case RADIO_ERROR_SOUND_POLICY:
+ err_msg = "RADIO_ERROR_SOUND_POLICY";
+ break;
+ default:
+ err_msg = "Unknown Error";
+ break;
+ }
+
+ return err_msg;
+}
+
+/**
+ * @function radio_view_add
+ * @since_tizen 3.0
+ * @description Radio View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return radio_view*
+ */
+radio_view *radio_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+ int ret;
+ radio_view *this = NULL;
+ this = calloc(1, sizeof(radio_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "2_part_cnt_btn";
+ tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ ret = radio_create(&g_pstRadio);
+ RETVM_IF(ret != RADIO_ERROR_NONE && ret != RADIO_ERROR_NOT_SUPPORTED, NULL, "radio_create failed : %s", get_radio_type_error(ret));
+
+ ret = radio_start(g_pstRadio);
+ RETVM_IF(ret != RADIO_ERROR_NONE && ret != RADIO_ERROR_NOT_SUPPORTED, NULL, "radio_start failed : %s", get_radio_type_error(ret));
+
+ ret = radio_set_interrupted_cb(g_pstRadio,_radio_interrupted_cb, this);
+ RETVM_IF(ret != RADIO_ERROR_NONE && ret != RADIO_ERROR_NOT_SUPPORTED, NULL, "radio_set_interrupted_cb failed : %s", get_radio_type_error(ret));
+
+ this->radio_label = ui_utils_label_add(this->view->layout, "Latitude: ");
+ elm_label_line_wrap_set(this->radio_label, ELM_WRAP_WORD);
+
+ if(ret == RADIO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Radio is not supported");
+ RETVM_IF(!this->view, NULL,"Radio is not supported");
+ }
+
+ radio_state_e estate;
+ ret = radio_get_state (g_pstRadio, &estate);
+ RETVM_IF(ret != RADIO_ERROR_NONE && ret != RADIO_ERROR_NOT_SUPPORTED, NULL, "radio_set_interrupted_cb failed : %s", get_radio_type_error(ret));
+
+ if(estate == RADIO_STATE_PLAYING)
+ {
+ ui_utils_label_set_text(this->radio_label, "RADIO is Playing", "left");
+ }
+
+ elm_object_part_content_set(this->view->layout, "1cnt", this->radio_label);
+
+ return this;
+}
+
+
+/**
+ * @function _app_destroy_cb
+ * @since_tizen 2.3
+ * @description App Destroy Cb
+ * @parameter void*: Void Pointer
+ * @return static void
+ */
+static void _app_destroy_cb(void* this)
+{
+
+ RETM_IF(NULL == this, "data is NULL");
+
+ int result;
+ radio_view *view = NULL;
+ view = (radio_view*)this;
+ RETM_IF(NULL == view, "view is NULL");
+
+ if(is_not_supported == true)
+ {
+ view->view->tbt_info->result = TBT_INFO_RESULT_NOT_SUPPORTED;
+ elm_genlist_item_update(view->view->item);
+ }
+
+ result = radio_unset_interrupted_cb(g_pstRadio);
+ RETM_IF(result != RADIO_ERROR_NONE, "radio_unset_interrupted_cb fail > Error = %s", get_radio_type_error(result));
+
+ result = radio_stop(g_pstRadio);
+ RETM_IF(result != RADIO_ERROR_NONE, "radio_stop fail > Error = %s", get_radio_type_error(result));
+
+ result = radio_destroy(g_pstRadio);
+ RETM_IF(result != RADIO_ERROR_NONE, "radio_destroy fail > Error = %s", get_radio_type_error(result));
+
+ SAFE_DELETE(view->view);
+ SAFE_DELETE(view);
+}
+
+
+/**
+ * @function _radio_interrupted_cb
+ * @since_tizen 3.0
+ * @description radio interrupted Cb
+ * @parameter radio_interrupted_code_e code, void *user_data
+ * @return void
+ */
+static void _radio_interrupted_cb(radio_interrupted_code_e code, void *user_data)
+{
+
+ RETM_IF(NULL == user_data, "user_data is null");
+ radio_view *this = NULL;
+ this = (radio_view*) user_data;
+ RETM_IF(NULL == this, "view is NULL");
+
+ DBG("value: %d", code);
+
+ switch (code)
+ {
+ case RADIO_INTERRUPTED_COMPLETED:
+ ui_utils_label_set_text(this->radio_label, "Interrupt completed", "left");
+ break;
+ case RADIO_INTERRUPTED_BY_MEDIA:
+ ui_utils_label_set_text(this->radio_label, "Interrupted by a non-resumable media application", "left");
+ break;
+ case RADIO_INTERRUPTED_BY_CALL:
+ ui_utils_label_set_text(this->radio_label, "Interrupted by an incoming call", "left");
+ break;
+ case RADIO_INTERRUPTED_BY_EARJACK_UNPLUG :
+ ui_utils_label_set_text(this->radio_label, "Interrupted by unplugging headphones", "left");
+ break;
+ case RADIO_INTERRUPTED_BY_RESOURCE_CONFLICT :
+ ui_utils_label_set_text(this->radio_label, "Interrupted by a resource conflict", "left");
+ break;
+ case RADIO_INTERRUPTED_BY_ALARM :
+ ui_utils_label_set_text(this->radio_label, "Interrupted by an alarm", "left");
+ break;
+ case RADIO_INTERRUPTED_BY_EMERGENCY :
+ ui_utils_label_set_text(this->radio_label, "Interrupted by a resumable media application", "left");
+ break;
+ case RADIO_INTERRUPTED_BY_NOTIFICATION :
+ ui_utils_label_set_text(this->radio_label, "Interrupted by a notification", "left");
+ break;
+ default:
+ ui_utils_label_set_text(this->radio_label, "unknown state", "left");
+ break;
+ }
+ return ;
+}
+
+#endif
Evas_Object *info_label;
};
+static bool is_not_supported = false;
+
static void _app_destroy_cb(void* this);
void _runtime_info_changed_cb(runtime_info_key_e key, void *user_data);
-
+static void _vibrate_state_changed_cb(runtime_info_key_e key, void *user_data);
+static void _battery_state_changed_cb(runtime_info_key_e key, void *user_data);
+static void _usb_state_changed_cb(runtime_info_key_e key, void *user_data);
+static void _gps_state_changed_cb(runtime_info_key_e key, void *user_data);
+static void _bluetooth_state_changed_cb(runtime_info_key_e key, void *user_data);
+static void _rotate_state_changed_cb(runtime_info_key_e key, void *user_data);
+static void _location_state_changed_cb(runtime_info_key_e key, void *user_data);
+static void _wifi_state_changed_cb(runtime_info_key_e key, void *user_data);
/**
* @function get_runtime_info_error
this->view = calloc(1, sizeof(common_view));
RETVM_IF(!this->view, NULL, "calloc failed");
- tbt_info->layout_group = "runtimeinfo_viewer";
- tbt_info->layout_file = get_edje_path("runtimeinfo_viewer.edj");
- common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
- RETVM_IF(NULL == this->view, NULL, "navi is null");
+ tbt_info->layout_group = "2_part_cnt_btn";
+ tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
- ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_AUDIO_JACK_STATUS, _runtime_info_changed_cb, this);
- RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret));
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ bool bvalue;
+ if(this->view->tbt_info->apptype == TBT_APP_AUDIO_JACK)
+ {
- this->info_label = ui_utils_label_add(this->view->layout, "Latitude: ");
- elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
+ ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_AUDIO_JACK_STATUS, _runtime_info_changed_cb, this);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret));
- if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
- {
- ui_utils_label_set_text(this->info_label, "Audio Jack is not supported", "left");
- elm_object_part_content_set(this->view->layout, "info_text", this->info_label);
- return this;
- }
+ this->info_label = ui_utils_label_add(this->view->layout, "Latitude: ");
+ elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
- ret = runtime_info_get_value_int(RUNTIME_INFO_KEY_AUDIO_JACK_STATUS, &value);
- RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret));
- if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
- {
- ui_utils_label_set_text(this->info_label, "Audio Jack is not supported", "left");
- elm_object_part_content_set(this->view->layout, "info_text", this->info_label);
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Audio Jack is not supported");
+ RETVM_IF(!this->view, NULL,"Audio Jack is not supported");
+ }
+ else
+ {
+ ret = runtime_info_get_value_int(RUNTIME_INFO_KEY_AUDIO_JACK_STATUS, &value);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Audio Jack is not supported");
+ RETVM_IF(!this->view, NULL,"Audio Jack is not supported");
+ }
+ else
+ {
+ DBG("value: %d", value);
+ switch(value)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, "Audio Jack Not connected", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "Audio Jack Connected with 3 wire earjack", "left");
+ break;
+
+ case 2:
+ ui_utils_label_set_text(this->info_label, "Audio Jack Connected with 4 wire earjack", "left");
+ break;
+
+ default:
+ ui_utils_label_set_text(this->info_label, "Unknown status", "left");
+ break;
+
+ }
+ }
+ }
+ elm_object_part_content_set(this->view->layout, "1cnt", this->info_label);
return this;
}
+ else if (this->view->tbt_info->apptype == TBT_APP_KEY_VIBRATION)
+ {
- DBG("value: %d", value);
-
-switch(value)
-{
- case 0:
- ui_utils_label_set_text(this->info_label, "Audio Jack Not connected", "left");
- break;
-
- case 1:
- ui_utils_label_set_text(this->info_label, "Audio Jack Connected with 3 wire earjack", "left");
- break;
+ ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_VIBRATION_ENABLED, _vibrate_state_changed_cb, this);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret));
- case 2:
- ui_utils_label_set_text(this->info_label, "Audio Jack Connected with 4 wire earjack", "left");
- break;
-
- default:
- ui_utils_label_set_text(this->info_label, "Unknown status", "left");
- break;
+ this->info_label = ui_utils_label_add(this->view->layout, "Longitude: ");
+ elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Vibration Mode is not supported");
+ RETVM_IF(!this->view, NULL,"Vibration Mode is not supported");
}
+ else
+ {
+ ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_VIBRATION_ENABLED, &bvalue);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Vibration Mode is not supported");
+ RETVM_IF(!this->view, NULL,"Vibration Mode is not supported");
+ }
+ else
+ {
+ DBG("value: %d", bvalue);
+
+ switch(bvalue)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, "Vibrate Mode is Not Enabled", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "Vibrate Mode is Enabled", "left");
+ break;
+ }
+ }
+ }
+ elm_object_part_content_set(this->view->layout, "1cnt", this->info_label);
+ return this;
+ }
+ else if (this->view->tbt_info->apptype == TBT_APP_BATTERY)
+ {
+ ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_BATTERY_IS_CHARGING, _battery_state_changed_cb, this);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret));
+
+ this->info_label = ui_utils_label_add(this->view->layout, "Percentage: ");
+ elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
+
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Battery Charging is not supported");
+ RETVM_IF(!this->view, NULL,"Battery Charging is not supported");
+ }
+ else
+ {
+ ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_BATTERY_IS_CHARGING, &bvalue);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Battery Charging is not supported");
+ RETVM_IF(!this->view, NULL,"Battery Charging is not supported");
+ }
+ else
+ {
+ DBG("value: %d", bvalue);
+ switch(bvalue)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, " Battery Not Charging", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "Battery Charging Started", "left");
+ break;
+ }
+ }
+ }
+ elm_object_part_content_set(this->view->layout, "1cnt", this->info_label);
+ return this;
+ }
+ else if (this->view->tbt_info->apptype == TBT_APP_GPS_STATUS)
+ {
+ this->info_label = ui_utils_label_add(this->view->layout, "GPS: ");
+ elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
+
+ ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_GPS_STATUS , _gps_state_changed_cb, this);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret));
+
+ this->info_label = ui_utils_label_add(this->view->layout, "GPS: ");
+ elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
+
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "GPS is not supported");
+ RETVM_IF(!this->view, NULL,"GPS is not supported");
+ }
+ else
+ {
+
+ ret = runtime_info_get_value_int(RUNTIME_INFO_KEY_GPS_STATUS , &value);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "GPS is not supported");
+ RETVM_IF(!this->view, NULL,"GPS is not supported");
+ }
+ else
+ {
+ DBG("value: %d", value);
+ switch(value)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, "GPS is disabled", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "GPS is searching for satellites", "left");
+ break;
+
+ case 2:
+ ui_utils_label_set_text(this->info_label, "GPS connection is established", "left");
+ break;
+
+ default:
+ ui_utils_label_set_text(this->info_label, "Unknown status", "left");
+ break;
+
+ }
+ }
+ }
+ elm_object_part_content_set(this->view->layout, "1cnt", this->info_label);
+ return this;
+ }
+ else if (this->view->tbt_info->apptype == TBT_APP_USB_CONNECTED)
+ {
+ ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_USB_CONNECTED , _usb_state_changed_cb, this);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret));
+
+ this->info_label = ui_utils_label_add(this->view->layout, "usb: ");
+ elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
+
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "USB is not supported");
+ RETVM_IF(!this->view, NULL,"USB is not supported");
+ }
+ else
+ {
+ ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_USB_CONNECTED , &bvalue);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "USB is not supported");
+ RETVM_IF(!this->view, NULL,"USB is not supported");
+ }
+ else
+ {
+ DBG("value: %d", bvalue);
+
+ switch(bvalue)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, "USB Not Connected", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "USB is Connected", "left");
+ break;
+ }
+ }
+ }
+ elm_object_part_content_set(this->view->layout, "1cnt", this->info_label);
+ return this;
+ }
+ else if (this->view->tbt_info->apptype == TBT_APP_BLUETOOTH_ENABLED)
+ {
+ ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_BLUETOOTH_ENABLED , _bluetooth_state_changed_cb, this);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret));
+
+ this->info_label = ui_utils_label_add(this->view->layout, "bluetooth: ");
+ elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
+
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Bluetooth is not supported");
+ RETVM_IF(!this->view, NULL,"Bluetooth is not supported");
+ }
+ else
+ {
+ ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_BLUETOOTH_ENABLED , &bvalue);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Bluetooth is not supported");
+ RETVM_IF(!this->view, NULL,"Bluetooth is not supported");
+ }
+ else
+ {
+ DBG("value: %d", bvalue);
+ switch(bvalue)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, "Bluetooth Not Enabled", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "Bluetooth is Enabled", "left");
+ break;
+ }
+ }
+ }
+ elm_object_part_content_set(this->view->layout, "1cnt", this->info_label);
+ return this;
+ }
+ else if (this->view->tbt_info->apptype == TBT_APP_AUTO_ROTATION_ENABLED)
+ {
- elm_object_part_content_set(this->view->layout, "info_text", this->info_label);
-
-
- return this;
+ ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED , _rotate_state_changed_cb, this);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret));
+
+ this->info_label = ui_utils_label_add(this->view->layout, "rotate: ");
+ elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
+
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "AUTO_ROTATION is not supported");
+ RETVM_IF(!this->view, NULL,"AUTO_ROTATION is not supported");
+ }
+ else
+ {
+ ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED , &bvalue);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "AUTO_ROTATION is not supported");
+ RETVM_IF(!this->view, NULL,"AUTO_ROTATION is not supported");
+ }
+ else
+ {
+ DBG("value: %d", bvalue);
+
+ switch(bvalue)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, "Auto Rotate Not Enabled", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "Auto Rotate is Enabled", "left");
+ break;
+ }
+ }
+ }
+ elm_object_part_content_set(this->view->layout, "1cnt", this->info_label);
+ return this;
+ }
+ else if (this->view->tbt_info->apptype == TBT_APP_LOCATION_SERVICE_ENABLED)
+ {
+
+ ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED , _location_state_changed_cb, this);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret));
+
+ this->info_label = ui_utils_label_add(this->view->layout, "location: ");
+ elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
+
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Location is not supported");
+ RETVM_IF(!this->view, NULL,"Location is not supported");
+ }
+ else
+ {
+ ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED , &bvalue);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Location is not supported");
+ RETVM_IF(!this->view, NULL,"Location is not supported");
+ }
+ else
+ {
+ DBG("value: %d", bvalue);
+ switch(bvalue)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, "Location Not Enabled", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "Location is Enabled", "left");
+ break;
+ }
+ }
+ }
+ elm_object_part_content_set(this->view->layout, "1cnt", this->info_label);
+ return this;
+ }
+ else if (this->view->tbt_info->apptype == TBT_APP_WIFI_HOTSPOT_ENABLED)
+ {
+ ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED , _wifi_state_changed_cb, this);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret));
+
+ this->info_label = ui_utils_label_add(this->view->layout, "wifi: ");
+ elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
+
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Wifi Hotspot is not supported");
+ RETVM_IF(!this->view, NULL,"Wifi Hotspot is not supported");
+ }
+ else
+ {
+ ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED , &bvalue);
+ RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Wifi Hotspot is not supported");
+ RETVM_IF(!this->view, NULL,"Wifi Hotspot is not supported");
+ }
+ else
+ {
+ DBG("value: %d", bvalue);
+ switch(bvalue)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, "Wifi Hotspot Not Enabled", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "Wifi Hotspot is Enabled", "left");
+ break;
+ }
+ }
+ }
+ elm_object_part_content_set(this->view->layout, "1cnt", this->info_label);
+ return this;
+
+ }
+ return this;
}
view = (runtimeinfo_view*)this;
RETM_IF(NULL == view, "view is NULL");
+ if(is_not_supported == true)
+ {
+ view->view->tbt_info->result = TBT_INFO_RESULT_NOT_SUPPORTED;
+ elm_genlist_item_update(view->view->item);
+ }
+
SAFE_DELETE(view->view);
SAFE_DELETE(view);
}
}
}
+/**
+ * @function _vibrate_state_changed_cb
+ * @since_tizen 2.3
+ * @description vibrate State Changed Cb
+ * @parameter runtime_info_key_e key, void *user_data
+ * @return static void
+ */
+static void _vibrate_state_changed_cb(runtime_info_key_e key, void *user_data)
+{
+ RETM_IF(NULL == user_data, "user_data is null");
+ int ret;
+ bool bvalue;
+ runtimeinfo_view *this = NULL;
+ this = (runtimeinfo_view*) user_data;
+
+ ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_VIBRATION_ENABLED, &bvalue);
+ RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ ui_utils_label_set_text(this->info_label, "Device Vibration is not supported", "left");
+ return;
+ }
+
+ DBG("value: %d", bvalue);
+
+switch(bvalue)
+{
+ case 0:
+ ui_utils_label_set_text(this->info_label, "Device Vibration is Not Enabled", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "Device Vibration is Enabled", "left");
+ break;
+ }
+}
+
+/**
+ * @function _battery_state_changed_cb
+ * @since_tizen 2.3
+ * @description battery State Changed Cb
+ * @parameter runtime_info_key_e key, void *user_data
+ * @return static void
+ */
+static void _battery_state_changed_cb(runtime_info_key_e key, void *user_data)
+{
+ RETM_IF(NULL == user_data, "user_data is null");
+ int ret;
+ bool bvalue;
+ runtimeinfo_view *this = NULL;
+ this = (runtimeinfo_view*) user_data;
+
+ ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_BATTERY_IS_CHARGING, &bvalue);
+ RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ ui_utils_label_set_text(this->info_label, "Battery Charging is not supported", "left");
+ return;
+ }
+
+ DBG("value: %d", bvalue);
+
+ switch(bvalue)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, "Battery Not Charging", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "Battery Charging Started", "left");
+ break;
+ }
+
+}
+
+/**
+ * @function _gps_state_changed_cb
+ * @since_tizen 2.3
+ * @description gps state Changed Cb
+ * @parameter runtime_info_key_e key, void *user_data
+ * @return void
+ */
+void _gps_state_changed_cb(runtime_info_key_e key, void *user_data)
+{
+
+ RETM_IF(NULL == user_data, "user_data is null");
+ int ret, value;
+ runtimeinfo_view *this = NULL;
+ this = (runtimeinfo_view*) user_data;
+
+ ret = runtime_info_get_value_int(RUNTIME_INFO_KEY_GPS_STATUS, &value);
+ RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ ui_utils_label_set_text(this->info_label, "GPS is not supported", "left");
+ return;
+ }
+
+ DBG("value: %d", value);
+
+ switch(value)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, "GPS is disabled", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "GPS is searching for satellites", "left");
+ break;
+
+ case 2:
+ ui_utils_label_set_text(this->info_label, "GPS connection is established", "left");
+ break;
+
+ default:
+ ui_utils_label_set_text(this->info_label, "Unknown status", "left");
+ break;
+
+ }
+}
+
+/**
+ * @function _usb_state_changed_cb
+ * @since_tizen 2.3
+ * @description usb State Changed Cb
+ * @parameter runtime_info_key_e key, void *user_data
+ * @return static void
+ */
+static void _usb_state_changed_cb(runtime_info_key_e key, void *user_data)
+{
+ RETM_IF(NULL == user_data, "user_data is null");
+ int ret;
+ bool bvalue;
+ runtimeinfo_view *this = NULL;
+ this = (runtimeinfo_view*) user_data;
+
+ ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_USB_CONNECTED, &bvalue);
+ RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ ui_utils_label_set_text(this->info_label, "USB is not supported", "left");
+ return;
+ }
+
+ DBG("value: %d", bvalue);
+
+ switch(bvalue)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, "USB Not Connected", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "USB is Connected", "left");
+ break;
+ }
+
+}
+
+/**
+ * @function _bluetooth_state_changed_cb
+ * @since_tizen 2.3
+ * @description bluetooth State Changed Cb
+ * @parameter runtime_info_key_e key, void *user_data
+ * @return static void
+ */
+static void _bluetooth_state_changed_cb(runtime_info_key_e key, void *user_data)
+{
+ RETM_IF(NULL == user_data, "user_data is null");
+ int ret;
+ bool bvalue;
+ runtimeinfo_view *this = NULL;
+ this = (runtimeinfo_view*) user_data;
+
+ ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_BLUETOOTH_ENABLED , &bvalue);
+ RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ ui_utils_label_set_text(this->info_label, "Bluetooth is not supported", "left");
+ return;
+ }
+
+ DBG("value: %d", bvalue);
+
+ switch(bvalue)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, "Bluetooth Not Enabled", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "Bluetooth is Enabled", "left");
+ break;
+ }
+
+}
+
+/**
+ * @function _rotate_state_changed_cb
+ * @since_tizen 2.3
+ * @description rotate State Changed Cb
+ * @parameter runtime_info_key_e key, void *user_data
+ * @return static void
+ */
+static void _rotate_state_changed_cb(runtime_info_key_e key, void *user_data)
+{
+ RETM_IF(NULL == user_data, "user_data is null");
+ int ret;
+ bool bvalue;
+ runtimeinfo_view *this = NULL;
+ this = (runtimeinfo_view*) user_data;
+
+ ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED , &bvalue);
+ RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ ui_utils_label_set_text(this->info_label, "Auto Rotate is not supported", "left");
+ return;
+ }
+
+ DBG("value: %d", bvalue);
+
+ switch(bvalue)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, "Auto Rotate Not Enabled", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "Auto Rotate is Enabled", "left");
+ break;
+ }
+
+
+}
+
+/**
+ * @function _location_state_changed_cb
+ * @since_tizen 2.3
+ * @description location State Changed Cb
+ * @parameter runtime_info_key_e key, void *user_data
+ * @return static void
+ */
+static void _location_state_changed_cb(runtime_info_key_e key, void *user_data)
+{
+ RETM_IF(NULL == user_data, "user_data is null");
+ int ret;
+ bool bvalue;
+ runtimeinfo_view *this = NULL;
+ this = (runtimeinfo_view*) user_data;
+
+ ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED , &bvalue);
+ RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ ui_utils_label_set_text(this->info_label, "Location is not supported", "left");
+ return;
+ }
+
+ DBG("value: %d", bvalue);
+
+ switch(bvalue)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, "Location Not Enabled", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "Location is Enabled", "left");
+ break;
+ }
+
+
+}
+
+/**
+ * @function _wifi_state_changed_cb
+ * @since_tizen 2.3
+ * @description wifi State Changed Cb
+ * @parameter runtime_info_key_e key, void *user_data
+ * @return static void
+ */
+static void _wifi_state_changed_cb(runtime_info_key_e key, void *user_data)
+{
+ RETM_IF(NULL == user_data, "user_data is null");
+ int ret;
+ bool bvalue;
+ runtimeinfo_view *this = NULL;
+ this = (runtimeinfo_view*) user_data;
+
+ ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED , &bvalue);
+ RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret));
+ if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+ {
+ ui_utils_label_set_text(this->info_label, "Wifi Hotspot is not supported", "left");
+ return;
+ }
+
+ DBG("value: %d", bvalue);
+
+ switch(bvalue)
+ {
+ case 0:
+ ui_utils_label_set_text(this->info_label, "Wifi Hotspot Not Enabled", "left");
+ break;
+
+ case 1:
+ ui_utils_label_set_text(this->info_label, "Wifi Hotspot is Enabled", "left");
+ break;
+ }
+
+
+}
+
+
#endif
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *******************************************************************************/
+/**
+ * @file tbt-soundmanager-view.c
+ * @brief retrieves soundmanager info
+ *
+ * @author Nibha Sharma(nibha.sharma@samsung.com)
+ * @date June, 2016
+ * @bug none
+ * @credit
+ *
+ */
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_SOUND_MANAGER
+
+#include <Elementary.h>
+#include <locations.h>
+
+#include "utils/logger.h"
+#include "utils/config.h"
+#include "utils/ui-utils.h"
+#include "view/tbt-sound-manager-view.h"
+#include "view/tbt-common-view.h"
+
+struct _soundmanager_view
+{
+ common_view* view;
+
+ Evas_Object *info_label;
+ Evas_Object *device_label;
+};
+
+static void _app_destroy_cb(void* this);
+void _sound_device_connected_cb(sound_device_h device, bool is_connected, void *user_data);
+void _sound_device_information_changed_cb(sound_device_h device, sound_device_changed_info_e changed_info, void *user_data);
+
+static bool is_not_supported = false;
+
+/**
+ * @function get_soundmanager_error
+ * @since_tizen 3.0
+ * @description Get SoundManager Error
+ * @parameter int: Int
+ * @return char*
+ */
+char* get_soundmanager_error(int ret)
+{
+ char* err_msg = NULL;
+ switch (ret) {
+ case SOUND_MANAGER_ERROR_NONE:
+ err_msg = "SOUND_MANAGER_ERROR_NONE";
+ break;
+ case SOUND_MANAGER_ERROR_OUT_OF_MEMORY:
+ err_msg = "SOUND_MANAGER_ERROR_OUT_OF_MEMORY";
+ break;
+ case SOUND_MANAGER_ERROR_INVALID_PARAMETER:
+ err_msg = "SOUND_MANAGER_ERROR_INVALID_PARAMETER";
+ break;
+ case SOUND_MANAGER_ERROR_INVALID_OPERATION:
+ err_msg = "SOUND_MANAGER_ERROR_INVALID_OPERATION";
+ break;
+ case SOUND_MANAGER_ERROR_PERMISSION_DENIED:
+ err_msg = "SOUND_MANAGER_ERROR_PERMISSION_DENIED";
+ break;
+ case SOUND_MANAGER_ERROR_NOT_SUPPORTED:
+ err_msg = "SOUND_MANAGER_ERROR_NOT_SUPPORTED";
+ break;
+ case SOUND_MANAGER_ERROR_NO_DATA:
+ err_msg = "SOUND_MANAGER_ERROR_NO_DATA";
+ break;
+ case SOUND_MANAGER_ERROR_NO_PLAYING_SOUND:
+ err_msg = "SOUND_MANAGER_ERROR_NO_PLAYING_SOUND";
+ break;
+ case SOUND_MANAGER_ERROR_INTERNAL:
+ err_msg = "SOUND_MANAGER_ERROR_INTERNAL";
+ break;
+ case SOUND_MANAGER_ERROR_POLICY:
+ err_msg = "SOUND_MANAGER_ERROR_POLICY";
+ break;
+ default:
+ err_msg = "Unknown Error";
+ }
+
+ return err_msg;
+}
+
+
+/**
+ * @function soundmanager_view_add
+ * @since_tizen 3.0
+ * @description soundmanager View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return soundmanager_view*
+ */
+soundmanager_view *soundmanager_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+ int ret;
+ soundmanager_view *this = NULL;
+ this = calloc(1, sizeof(soundmanager_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "2_part_cnt_btn";
+ tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ if(this->view->tbt_info->apptype == TBT_APP_SOUND_MANAGER)
+ {
+
+ ret = sound_manager_set_device_connected_cb(SOUND_DEVICE_IO_DIRECTION_BOTH_MASK,_sound_device_connected_cb,this);
+ RETVM_IF(ret != SOUND_MANAGER_ERROR_NONE && ret != SOUND_MANAGER_ERROR_NOT_SUPPORTED, NULL, "sound_manager_set_device_connected_cb failed : %s", get_soundmanager_error(ret));
+
+ this->info_label = ui_utils_label_add(this->view->layout, "Please change Audio Jack state[Insert/Remove]");
+ elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
+
+ if(ret == SOUND_MANAGER_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Sound Device is not supported");
+ RETVM_IF(!this->view, NULL,"Sound Device is not supported");
+ }
+ elm_object_part_content_set(this->view->layout, "1cnt", this->info_label);
+ return this;
+ }
+ else if (this->view->tbt_info->apptype == TBT_APP_SOUND_MANAGER_DEVICE)
+ {
+
+ ret = sound_manager_set_device_information_changed_cb(SOUND_DEVICE_TYPE_EXTERNAL_MASK, _sound_device_information_changed_cb,this);
+ RETVM_IF(ret != SOUND_MANAGER_ERROR_NONE && ret != SOUND_MANAGER_ERROR_NOT_SUPPORTED, NULL, "sound_manager_set_device_information_changed_cb failed : %s", get_soundmanager_error(ret));
+
+ this->info_label = ui_utils_label_add(this->view->layout, "Insert Audio jack and change sound profile to Sound");
+ elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
+
+ if(ret == SOUND_MANAGER_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Sound Device is not supported");
+ RETVM_IF(!this->view, NULL,"Sound Device is not supported");
+ }
+ elm_object_part_content_set(this->view->layout, "1cnt", this->info_label);
+ return this;
+ }
+
+ return this;
+}
+
+
+/**
+ * @function _app_destroy_cb
+ * @since_tizen 2.3
+ * @description App Destroy Cb
+ * @parameter void*: Void Pointer
+ * @return static void
+ */
+static void _app_destroy_cb(void* this)
+{
+
+ RETM_IF(NULL == this, "data is NULL");
+
+ soundmanager_view *view = NULL;
+ view = (soundmanager_view*)this;
+ RETM_IF(NULL == view, "view is NULL");
+
+ if(is_not_supported == true)
+ {
+ view->view->tbt_info->result = TBT_INFO_RESULT_NOT_SUPPORTED;
+ elm_genlist_item_update(view->view->item);
+ }
+
+ SAFE_DELETE(view->view);
+ SAFE_DELETE(view);
+}
+
+
+/**
+ * @function _sound_device_connected_cb
+ * @since_tizen 3.0
+ * @description Sound Device Connected Cb
+ * @parameter sound_device_h device, bool is_connected, void *user_data
+ * @return void
+ */
+void _sound_device_connected_cb(sound_device_h device, bool is_connected, void *user_data)
+{
+
+ RETM_IF(NULL == user_data, "user_data is null");
+ soundmanager_view *this = NULL;
+ this = (soundmanager_view*) user_data;
+
+ DBG("is_connected: %d", is_connected);
+
+ if(is_connected == true)
+ {
+ ui_utils_label_set_text(this->info_label, "Audio Jack connected", "left");
+ }
+ else
+ {
+ ui_utils_label_set_text(this->info_label, "Audio Jack Not connected", "left");
+ }
+
+}
+
+/**
+ * @function _sound_device_information_changed_cb
+ * @since_tizen 3.0
+ * @description sound Device Information Changed Cb
+ * @parameter sound_device_h device, sound_device_changed_info_e changed_info, void *user_data
+ * @return void
+ */
+void _sound_device_information_changed_cb(sound_device_h device, sound_device_changed_info_e changed_info, void *user_data)
+{
+
+ RETM_IF(NULL == user_data, "user_data is null");
+ soundmanager_view *this = NULL;
+ this = (soundmanager_view*) user_data;
+
+ DBG("changed_info: %d", changed_info);
+
+ switch(changed_info)
+ {
+ case SOUND_DEVICE_CHANGED_INFO_STATE :
+ ui_utils_label_set_text(this->info_label, "State of the device was changed", "left");
+ break;
+
+ case SOUND_DEVICE_CHANGED_INFO_IO_DIRECTION:
+ ui_utils_label_set_text(this->info_label, "IO direction of the device was changed", "left");
+ break;
+ default:
+ ui_utils_label_set_text(this->info_label, "Unknown status", "left");
+ break;
+ }
+
+}
+
+#endif
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *******************************************************************************/
+/**
+ * @file tbt-runtimeinfo-view.c
+ * @brief retrieves runtime info
+ *
+ * @author Nibha Sharma(nibha.sharma@samsung.com)
+ * @date June, 2016
+ * @bug none
+ * @credit
+ *
+ */
+#include "utils/app_module_config.h"
+#ifdef TBT_MODULE_STORAGE
+
+#include <Elementary.h>
+#include <locations.h>
+
+#include "utils/logger.h"
+#include "utils/config.h"
+#include "utils/ui-utils.h"
+#include "view/tbt-storage-view.h"
+#include "view/tbt-common-view.h"
+
+struct _storage_view
+{
+ common_view* view;
+
+ Evas_Object *info_label;
+};
+
+static void _app_destroy_cb(void* this);
+static void _storage_state_changed_cb(int storage_id, storage_state_e state, void *user_data);
+bool storage_device_supported_cb_p(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data);
+
+static int StorageID;
+static bool is_not_supported = false;
+
+/**
+ * @function get_storage_error
+ * @since_tizen 3.0
+ * @description Get Storage Error
+ * @parameter int: Int
+ * @return char*
+ */
+char* get_storage_type_error(int ret)
+{
+ char* err_msg = NULL;
+ switch (ret) {
+ case STORAGE_ERROR_NONE:
+ err_msg = "STORAGE_ERROR_NONE";
+ break;
+ case STORAGE_ERROR_INVALID_PARAMETER:
+ err_msg = "STORAGE_ERROR_INVALID_PARAMETER";
+ break;
+ case STORAGE_ERROR_OUT_OF_MEMORY:
+ err_msg = "STORAGE_ERROR_OUT_OF_MEMORY";
+ break;
+ case STORAGE_ERROR_NOT_SUPPORTED:
+ err_msg = "STORAGE_ERROR_NOT_SUPPORTED";
+ break;
+ case STORAGE_ERROR_OPERATION_FAILED:
+ err_msg = "STORAGE_ERROR_OPERATION_FAILED";
+ break;
+ default:
+ err_msg = "Unknown Error";
+ break;
+ }
+
+ return err_msg;
+}
+
+
+
+/**
+* @function storage_device_supported_cb_p
+* @description callback for supported devices
+* @parameter storage_id : storage id, type : storage type, state : state, path : storage path, user_data : user data passed to callback
+* @return bool
+*/
+bool storage_device_supported_cb_p(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
+{
+ StorageID = 0;
+ storage_view *this = NULL;
+ this = (storage_view*) user_data;
+ if(type == STORAGE_TYPE_EXTERNAL)
+ {
+ StorageID=storage_id;
+ return false;
+ }
+ return true;
+}
+
+/**
+ * @function storage_view_add
+ * @since_tizen 3.0
+ * @description storage View Add
+ * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer
+ * @return storage_view*
+ */
+storage_view *storage_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item)
+{
+ RETVM_IF(NULL == navi, NULL, "navi is null");
+ int ret;
+ storage_view *this = NULL;
+ this = calloc(1, sizeof(storage_view));
+ RETVM_IF(!this, NULL, "calloc failed");
+
+ this->view = calloc(1, sizeof(common_view));
+ RETVM_IF(!this->view, NULL, "calloc failed");
+
+ tbt_info->layout_group = "2_part_cnt_btn";
+ tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj");
+
+ common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this);
+ RETVM_IF(NULL == this->view, NULL, "navi is null");
+
+ ret = storage_foreach_device_supported(storage_device_supported_cb_p, this);
+ RETVM_IF(ret != STORAGE_ERROR_NONE && ret != STORAGE_ERROR_NOT_SUPPORTED, NULL, "storage_foreach_device_supported failed : %s", get_storage_type_error(ret));
+ if(ret == STORAGE_ERROR_NOT_SUPPORTED)
+ {
+ is_not_supported = true;
+ Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message");
+ elm_object_text_set(popup, "Storage is not supported");
+ RETVM_IF(!this->view, NULL,"Storage is not supported");
+ }
+
+ ret = storage_set_state_changed_cb(StorageID, _storage_state_changed_cb, this);
+ RETVM_IF(ret != STORAGE_ERROR_NONE, NULL, "storage_set_state_changed_cb failed : %s", get_storage_type_error(ret));
+
+ this->info_label = ui_utils_label_add(this->view->layout, "Please Change SD Card state[Remove/Insert]");
+ elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD);
+
+ elm_object_part_content_set(this->view->layout, "1cnt", this->info_label);
+
+ return this;
+}
+
+
+/**
+ * @function _app_destroy_cb
+ * @since_tizen 2.3
+ * @description App Destroy Cb
+ * @parameter void*: Void Pointer
+ * @return static void
+ */
+static void _app_destroy_cb(void* this)
+{
+
+ RETM_IF(NULL == this, "data is NULL");
+
+ storage_view *view = NULL;
+ view = (storage_view*)this;
+ RETM_IF(NULL == view, "view is NULL");
+
+ if(is_not_supported == true)
+ {
+ view->view->tbt_info->result = TBT_INFO_RESULT_NOT_SUPPORTED;
+ elm_genlist_item_update(view->view->item);
+ }
+
+ int ret = storage_unset_state_changed_cb( StorageID, _storage_state_changed_cb);
+ RETM_IF(ret != STORAGE_ERROR_NONE, "storage_unset_state_changed_cb fail > Error = %s", get_storage_type_error(ret));
+
+ SAFE_DELETE(view->view);
+ SAFE_DELETE(view);
+}
+
+
+/**
+ * @function storage_state_changed_cb
+ * @since_tizen 3.0
+ * @description storage Info Changed Cb
+ * @parameter int storage_id, storage_state_e state, void *user_data
+ * @return void
+ */
+static void _storage_state_changed_cb(int storage_id, storage_state_e state, void *user_data)
+{
+
+ RETM_IF(NULL == user_data, "user_data is null");
+ storage_view *this = NULL;
+ this = (storage_view*) user_data;
+
+ DBG("value: %d", state);
+
+ switch (state)
+ {
+ case STORAGE_STATE_UNMOUNTABLE:
+ ui_utils_label_set_text(this->info_label, "STORAGE_STATE_UNMOUNTABLE", "left");
+ break;
+ case STORAGE_STATE_REMOVED:
+ ui_utils_label_set_text(this->info_label, "STORAGE_STATE_REMOVED", "left");
+ break;
+ case STORAGE_STATE_MOUNTED:
+ ui_utils_label_set_text(this->info_label, "STORAGE_STATE_MOUNTED", "left");
+ break;
+ case STORAGE_STATE_MOUNTED_READ_ONLY:
+ ui_utils_label_set_text(this->info_label, "STORAGE_STATE_MOUNTED_READ_ONLY", "left");
+ break;
+ default:
+ ui_utils_label_set_text(this->info_label, "unknown state", "left");
+ break;
+ }
+}
+
+#endif
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.tbtcoreapp" version="1.0.0">
<profile name="wearable"/>
- <ui-application appid="org.tizen.tbtcoreapp" exec="tbtcoreapp" multiple="false" nodisplay="false" splash-screen-display="true" taskmanage="true" type="capp">
+ <ui-application appid="org.tizen.tbtcoreapp" exec="tbtcoreapp" multiple="false" nodisplay="false" taskmanage="true" type="capp">
<label>tbtcoreapp</label>
<icon>tbtcoreapp.png</icon>
</ui-application>
<privilege>http://tizen.org/privilege/internet</privilege>
<privilege>http://tizen.org/privilege/network.set</privilege>
<privilege>http://tizen.org/privilege/notification</privilege>
- <privilege>http://tizen.org/privilege/callhistory.read</privilege>
+ <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
+ <privilege>http://tizen.org/privilege/packagemanager.clearcache</privilege>
+ <privilege>http://tizen.org/privilege/network.set</privilege>
+ <privilege>http://tizen.org/privilege/volume.set</privilege>
+ <privilege>http://tizen.org/privilege/network.profile</privilege>
+ <privilege>http://tizen.org/privilege/callhistory.read</privilege>
<privilege>http://tizen.org/privilege/callhistory.write</privilege>
<privilege>http://tizen.org/privilege/contact.read</privilege>
<privilege>http://tizen.org/privilege/contact.write</privilege>
- </privileges>
+</privileges>
</manifest>