Enable fine grain build option support 89/5589/1
authorRusty Lynch <rusty.lynch@intel.com>
Tue, 9 Jul 2013 21:07:59 +0000 (14:07 -0700)
committerRusty Lynch <rusty.lynch@intel.com>
Tue, 9 Jul 2013 23:46:56 +0000 (16:46 -0700)
Change-Id: I18c29329d5ec7ea04c506b24f022ddccecbfffa8

CMakeLists.txt
packaging/wrt-plugins-tizen.spec
src/MessagePort/CMakeLists.txt
src/Systeminfo/CMakeLists.txt
src/Systeminfo/EventWatchSysteminfo.cpp
src/Systeminfo/Systeminfo.cpp
src/Systeminfo/Systeminfo.h

index e8bc12d..81c8c69 100755 (executable)
@@ -92,6 +92,22 @@ IF(ENABLE_OPTIONAL_SE)
     ADD_DEFINITIONS( -DFEATURE_OPTIONAL_SE )
 ENDIF(ENABLE_OPTIONAL_SE)
 
+
+IF(ENABLE_OPTIONAL_MSG_PORT)
+    MESSAGE(STATUS "Message port API Enabled")
+    ADD_DEFINITIONS( -DFEATURE_OPTIONAL_MSG_PORT )
+ENDIF(ENABLE_OPTIONAL_MSG_PORT)
+
+IF(ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT)
+    MESSAGE(STATUS "System-info SIM management API Enabled")
+    ADD_DEFINITIONS( -DENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT )
+ENDIF(ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT)
+
+IF(ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT)
+    MESSAGE(STATUS "System-info Cellular Network management API Enabled")
+    ADD_DEFINITIONS( -DENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT )
+ENDIF(ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT)
+
 # -----------------------------------------------------------------------------
 # CFlags
 # -----------------------------------------------------------------------------
index 4e81924..35ac175 100755 (executable)
@@ -1,3 +1,12 @@
+%bcond_with wrt_option_bluetooth
+%bcond_with wrt_option_call_history
+%bcond_with wrt_option_nbs
+%bcond_with wrt_option_nfc
+%bcond_with wrt_option_push
+%bcond_with wrt_option_se
+%bcond_with wrt_option_sysinfo_tel_sim_mngt
+%bcond_with wrt_option_sysinfo_cellular_network_mngt
+%bcond_with wrt_option_msg_port
 Name:       wrt-plugins-tizen
 Summary:    JavaScript plugins for WebRuntime
 Version:    0.4.32
@@ -31,15 +40,23 @@ BuildRequires:  pkgconfig(wrt-plugins-commons-javascript)
 BuildRequires:  pkgconfig(wrt-plugins-plugin-manager)
 BuildRequires:  pkgconfig(capi-appfw-application)
 BuildRequires:  pkgconfig(capi-appfw-app-manager)
+%if %{with wrt_option_nfc}
 BuildRequires:  pkgconfig(capi-network-nfc)
+%endif
 BuildRequires:  pkgconfig(capi-location-geocoder)
 BuildRequires:  pkgconfig(capi-location-manager)
 BuildRequires:  pkgconfig(capi-location-poi)
 BuildRequires:  pkgconfig(capi-location-route)
+%if %{with wrt_option_bluetooth}
 BuildRequires:  pkgconfig(capi-network-bluetooth)
+%endif
 BuildRequires:  pkgconfig(capi-network-connection)
+%if %{with wrt_option_call_history}
 BuildRequires:  pkgconfig(capi-telephony-call)
+%endif
+%if %{with wrt_option_sysinfo_tel_sim_mngt}
 BuildRequires:  pkgconfig(capi-telephony-sim)
+%endif
 BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  pkgconfig(capi-system-runtime-info)
 BuildRequires:  pkgconfig(sensor)
@@ -56,9 +73,13 @@ BuildRequires:  pkgconfig(pkgmgr)
 BuildRequires:  pkgconfig(pkgmgr-info)
 BuildRequires:  pkgconfig(capi-appfw-package-manager)
 BuildRequires:  pkgconfig(capi-web-url-download)
+%if %{with wrt_option_push}
 BuildRequires:  pkgconfig(push)
+%endif
 BuildRequires:  pkgconfig(notification)
+%if %{with wrt_option_msg_port}
 BuildRequires:  pkgconfig(message-port)
+%endif
 BuildRequires:  pkgconfig(sync-agent)
 BuildRequires:  pkgconfig(security-server)
 BuildRequires:  expat-devel
@@ -90,12 +111,33 @@ Wrt-plugin-tizen development headers
 export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
 
 %cmake \
--DENABLE_OPTIONAL_BT=YES \
--DENABLE_OPTIONAL_CALL_HISTORY=YES \
--DENABLE_OPTIONAL_NBS=YES \
--DENABLE_OPTIONAL_NFC=YES \
--DENABLE_OPTIONAL_PUSH=YES \
--DENABLE_OPTIONAL_SE=YES \
+%if %{with wrt_option_bluetooth}
+    -DENABLE_OPTIONAL_BT=YES \
+%endif
+%if %{with wrt_option_call_history}
+    -DENABLE_OPTIONAL_CALL_HISTORY=YES \
+%endif
+%if %{with wrt_option_nbs}
+    -DENABLE_OPTIONAL_NBS=YES \
+%endif
+%if %{with wrt_option_nfc}
+    -DENABLE_OPTIONAL_NFC=YES \
+%endif
+%if %{with wrt_option_push}
+    -DENABLE_OPTIONAL_PUSH=YES \
+%endif
+%if %{with wrt_option_se}
+    -DENABLE_OPTIONAL_SE=YES \
+%endif
+%if %{with wrt_option_sysinfo_tel_sim_mngt}
+    -DENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT=YES \
+%endif
+%if %{with wrt_option_sysinfo_cellular_network_mngt}
+    -DENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT=YES \
+%endif
+%if %{with wrt_option_msg_port}
+    -DENABLE_OPTIONAL_MSG_PORT=YES \
+%endif
 . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DDPL_LOG="ON" -DENABLE_TIME_TRACER="OFF"
 
 make %{?jobs:-j%jobs}
index c1f9431..1da5ba5 100644 (file)
@@ -2,6 +2,7 @@ SET(TARGET_NAME ${messageport_target})
 SET(DESTINATION_NAME ${messageport_dest})
 SET(TARGET_IMPL_NAME ${messageport_impl})
 
+IF(ENABLE_OPTIONAL_MSG_PORT)
 PKG_CHECK_MODULES(platform_pkgs_messageport REQUIRED message-port)
 
 INCLUDE_DIRECTORIES(
@@ -55,3 +56,4 @@ INSTALL(
        DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${DESTINATION_HEADER_PREFIX}/messageport
        FILES_MATCHING PATTERN "*.h" PATTERN "CMakeFiles" EXCLUDE
 )
+ENDIF(ENABLE_OPTIONAL_MSG_PORT)
index fdf043e..d8e3661 100755 (executable)
@@ -3,7 +3,6 @@ SET(DESTINATION_NAME ${systeminfo_dest})
 SET(TARGET_IMPL_NAME ${systeminfo_impl})
 
 PKG_CHECK_MODULES(platform_pkgs_systeminfo REQUIRED
-       capi-telephony-sim
        capi-network-connection
        capi-system-info
        capi-system-runtime-info
@@ -11,9 +10,16 @@ PKG_CHECK_MODULES(platform_pkgs_systeminfo REQUIRED
        sensor
 )
 
+IF(ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT)
+PKG_CHECK_MODULES(platform_pkgs_systeminfo_tel_sim REQUIRED
+       capi-telephony-sim
+)
+ENDIF()
+
 INCLUDE_DIRECTORIES(
        ${INCLUDE_COMMON}
        ${platform_pkgs_systeminfo_INCLUDE_DIRS}
+        ${platform_pkgs_systeminfo_tel_sim_INCLUDE_DIRS}
 )
 
 SET(CMAKE_INSTALL_RPATH
@@ -31,10 +37,8 @@ SET(SRCS_IMPL
        JSStorageInfo.cpp
        JSCpuInfo.cpp
        JSWifiNetworkInfo.cpp
-       JSCellularNetworkInfo.cpp
        JSBatteryInfo.cpp
        JSNetworkInfo.cpp
-       JSSIMInfo.cpp
        JSDeviceOrientationInfo.cpp
        JSBuildInfo.cpp
        JSLocaleInfo.cpp
@@ -46,11 +50,24 @@ SET(SRCS_IMPL
        SysteminfoListenerManager.cpp
 )
 
+IF(ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT)
+LIST(APPEND SRCS_IMPL
+       JSSIMInfo.cpp
+)
+ENDIF()
+
+IF(ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT)
+LIST(APPEND SRCS_IMPL
+       JSCellularNetworkInfo.cpp
+)
+ENDIF()
+
 ADD_LIBRARY(${TARGET_IMPL_NAME} SHARED ${SRCS_IMPL})
 
 TARGET_LINK_LIBRARIES(${TARGET_IMPL_NAME}
        ${LIBS_COMMON}
        ${platform_pkgs_systeminfo_LIBRARIES}
+       ${platform_pkgs_systeminfo_tel_sim_LIBRARIES}
 )
 
 SET(SRCS
index c64e5b7..6424a05 100755 (executable)
@@ -305,7 +305,9 @@ void EventWatchSysteminfo::processGetValue()
             break;
 
         case WATCH_TYPE_WIFINETWORK :
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNG
         case WATCH_TYPE_CELLULARNETWORK :
+#endif
         case WATCH_TYPE_DEVICE_ORIENTATION :
         case WATCH_TYPE_NETWORK :
         case WATCH_TYPE_LOCALE : 
index f40bb37..ec821c9 100755 (executable)
@@ -47,14 +47,14 @@ void PeripheralValueCallback(keynode_t *node, void *event_ptr)
         ((Systeminfo*)event_ptr)->getWatchValue(WATCH_TYPE_PERIPHERAL);
     }
 }
-
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
 void CellularNetworkValueCallback(keynode_t *node, void *event_ptr)
 {
     if(event_ptr) {
         ((Systeminfo*)event_ptr)->getWatchValue(WATCH_TYPE_CELLULARNETWORK);
     }
 }
-
+#endif
 void DisplayValueCallback(keynode_t *node, void* event_ptr)
 {
     if(event_ptr) {
@@ -145,8 +145,12 @@ Systeminfo::Systeminfo() : m_networkRegist(REGIST_NOT),
         (*m_Property)["DISPLAY"] = BasePropertyPtr(new Display());
         (*m_Property)["NETWORK"] = BasePropertyPtr(new Network());
         (*m_Property)["WIFI_NETWORK"] = BasePropertyPtr(new WifiNetwork());
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
         (*m_Property)["CELLULAR_NETWORK"] = BasePropertyPtr(new CellularNetwork());
+#endif
+#ifdef ENABLE_OPTIONAL_SYSINFO_TEL_SIM
         (*m_Property)["SIM"] = BasePropertyPtr(new SIM());
+#endif
         (*m_Property)["DEVICE_ORIENTATION"] = BasePropertyPtr(new DeviceOrientation());
         (*m_Property)["BUILD"] = BasePropertyPtr(new Build());
         (*m_Property)["LOCALE"] = BasePropertyPtr(new Locale());
@@ -257,11 +261,14 @@ void Systeminfo::clearWatch(const long id)
                     if (m_networkRegist == REGIST_WIFI) {
                         connection_unset_ip_address_changed_cb(m_connectionHandle);
                         m_networkRegist = REGIST_NOT;
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
                     } else if (m_networkRegist== REGIST_ALL) {
                         m_networkRegist = REGIST_CELLULAR;
+#endif
                     }
                 }
                 break;
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
             case WATCH_TYPE_CELLULARNETWORK:
                 if ((m_EventMgrPtr->getEventCellularNetworkList()).size() == 1) {
                     vconf_ignore_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE, CellularNetworkValueCallback);
@@ -275,6 +282,7 @@ void Systeminfo::clearWatch(const long id)
                     }
                 }
                 break;
+#endif
             case WATCH_TYPE_STORAGE:
                 if ((m_EventMgrPtr->getEventStorageList()).size() == 1) {
                     if (m_storageTimer) {
@@ -362,17 +370,22 @@ void Systeminfo::getWatchValue(const int watchType)
         }
     } else if (watchType == WATCH_TYPE_NETWORK_ALL) {
         EventWifiNetworkList eventListWifi = m_EventMgrPtr->getEventWifiNetworkList();
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
         EventWifiNetworkList eventListCellular = m_EventMgrPtr->getEventCellularNetworkList();
+#endif
         if (eventListWifi.size() > 0) {
             for (EventWifiNetworkList::iterator it = eventListWifi.begin(); it != eventListWifi.end(); it++) {
                 (*it)->getWatchValue();
             }
         }
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
         if (eventListCellular.size() > 0) {
             for (EventCellularNetworkList::iterator it = eventListCellular.begin(); it != eventListCellular.end(); it++) {
                 (*it)->getWatchValue();
             }
+
         }
+#endif
     } else if (watchType == WATCH_TYPE_CPU) {
         EventCpuList eventList = m_EventMgrPtr->getEventCpuList();
         for (EventCpuList::iterator it = eventList.begin(); it != eventList.end(); it++) {
@@ -412,6 +425,7 @@ void Systeminfo::getWatchValue(const int watchType)
         for (EventPeripheralList::iterator it = eventList.begin(); it != eventList.end(); it++) {
             (*it)->getWatchValue();
         }
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
     } else if (watchType == WATCH_TYPE_CELLULARNETWORK) {
         EventWifiNetworkList eventListCellular = m_EventMgrPtr->getEventCellularNetworkList();
         if (eventListCellular.size() > 0) {
@@ -419,6 +433,7 @@ void Systeminfo::getWatchValue(const int watchType)
                 (*it)->getWatchValue();
             }
         }
+#endif
     }
 }
 
@@ -494,11 +509,14 @@ void Systeminfo::OnRequestReceived(const EventWatchSysteminfoPtr& event)
                 if (m_networkRegist == REGIST_NOT) {
                     connection_set_ip_address_changed_cb(m_connectionHandle, NetworkValueCallback, (void *)this);
                     m_networkRegist = REGIST_WIFI;
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
                 } else if (m_networkRegist== REGIST_CELLULAR) {
                     m_networkRegist = REGIST_ALL;
+#endif
                 }
             }
             break;
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
         case WATCH_TYPE_CELLULARNETWORK:
             if ((m_EventMgrPtr->getEventCellularNetworkList()).size() == 1) {
                 vconf_notify_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE, CellularNetworkValueCallback, (void *)this);
@@ -512,6 +530,7 @@ void Systeminfo::OnRequestReceived(const EventWatchSysteminfoPtr& event)
                 }
             }
             break;
+#endif
         case WATCH_TYPE_STORAGE:
             if ((m_EventMgrPtr->getEventStorageList()).size() == 1) {
                 if (!m_storageTimer) {
@@ -596,12 +615,14 @@ void Systeminfo::EventMgr::clearAllEvent()
         event->clearWatch();
         m_eventWifiNetworkList.pop_front();
     }
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
     while (!m_eventCelluarNetworkList.empty()) {
         EventWatchSysteminfoPtr event = m_eventCelluarNetworkList.front();
         LoggerD("removing EventId=" << event->getId());
         event->clearWatch();
         m_eventCelluarNetworkList.pop_front();
     }
+#endif
     while (!m_eventStorageList.empty()) {
         EventWatchSysteminfoPtr event = m_eventStorageList.front();
         LoggerD("removing EventId=" << event->getId());
@@ -614,12 +635,14 @@ void Systeminfo::EventMgr::clearAllEvent()
         event->clearWatch();
         m_eventCpuList.pop_front();
     }
+#ifdef ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT
     while (!m_eventSimList.empty()) {
         EventWatchSysteminfoPtr event = m_eventSimList.front();
         LoggerD("removing EventId=" << event->getId());
         event->clearWatch();
         m_eventSimList.pop_front();
     }
+#endif
     while (!m_eventDeviceOrientationList.empty()) {
         EventWatchSysteminfoPtr event = m_eventDeviceOrientationList.front();
         LoggerD("removing EventId=" << event->getId());
@@ -653,18 +676,22 @@ void Systeminfo::EventMgr::addEvent(const EventWatchSysteminfoPtr& arg, const in
     } else if (watchType == WATCH_TYPE_WIFINETWORK) {
         m_eventWifiNetworkList.push_back(arg);
         LoggerD("Event wifi network list size=" << m_eventWifiNetworkList.size());
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
     } else if (watchType == WATCH_TYPE_CELLULARNETWORK) {
         m_eventCelluarNetworkList.push_back(arg);
         LoggerD("Event cellular network list size=" << m_eventCelluarNetworkList.size());
+#endif
     } else if (watchType == WATCH_TYPE_STORAGE) {
         m_eventStorageList.push_back(arg);
         LoggerD("Event storage list size=" << m_eventStorageList.size());
     } else if (watchType == WATCH_TYPE_CPU) {
         m_eventCpuList.push_back(arg);
         LoggerD("Event cpu list size=" << m_eventCpuList.size());
+#ifdef ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT
     } else if (watchType == WATCH_TYPE_SIM) {
         m_eventSimList.push_back(arg);
         LoggerD("Event sim list size=" << m_eventSimList.size());
+#endif
     } else if (watchType == WATCH_TYPE_DEVICE_ORIENTATION) {
         m_eventDeviceOrientationList.push_back(arg);
         LoggerD("Event device orientation list size=" << m_eventDeviceOrientationList.size());
@@ -733,6 +760,7 @@ void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
 
         LoggerD("event wifi network list size=" << m_eventWifiNetworkList.size());
         m_eventWifiNetworkList.remove(event);
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
         LoggerD( "event removed, event wifi network list size=" << m_eventCelluarNetworkList.size());
     } else if (watchType == WATCH_TYPE_CELLULARNETWORK) {
         for (EventCellularNetworkList::iterator it = m_eventCelluarNetworkList.begin(); it != m_eventCelluarNetworkList.end(); it++) {
@@ -749,6 +777,7 @@ void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
         LoggerD("event cellular network list size=" << m_eventCelluarNetworkList.size());
         m_eventCelluarNetworkList.remove(event);
         LoggerD( "event removed, event cellular network list size=" << m_eventCelluarNetworkList.size());
+#endif
     } else if (watchType == WATCH_TYPE_STORAGE) {
         for (EventStorageList::iterator it = m_eventStorageList.begin(); it != m_eventStorageList.end(); it++) {
             if (id == (*it)->getId()) {
@@ -779,6 +808,7 @@ void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
         LoggerD("event cpu list size=" << m_eventCpuList.size());
         m_eventCpuList.remove(event);
         LoggerD( "event removed, event cpu list size=" << m_eventCpuList.size());
+#ifdef ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT
     } else if (watchType == WATCH_TYPE_SIM) {
         for (EventSimList::iterator it = m_eventSimList.begin(); it != m_eventSimList.end(); it++) {
             if (id == (*it)->getId()) {
@@ -809,6 +839,7 @@ void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
         LoggerD("event device orientation list size=" << m_eventDeviceOrientationList.size());
         m_eventDeviceOrientationList.remove(event);
         LoggerD( "event removed, event device orientation list size=" << m_eventDeviceOrientationList.size());
+#endif
     } else if (watchType == WATCH_TYPE_NETWORK) {
         for (EventNetworkList::iterator it = m_eventNetworkList.begin(); it != m_eventNetworkList.end(); it++) {
             if (id == (*it)->getId()) {
@@ -884,13 +915,15 @@ const int Systeminfo::EventMgr::getWatchType(const long id)
         }
     }
 
+
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
     for (EventCellularNetworkList::iterator it = m_eventCelluarNetworkList.begin(); it != m_eventCelluarNetworkList.end(); it++) {
         if (id == (*it)->getId()) {
             event = *it;
             break;
         }
     }
-
+#endif
     for (EventStorageList::iterator it = m_eventStorageList.begin(); it != m_eventStorageList.end(); it++) {
         if (id == (*it)->getId()) {
             event = *it;
@@ -904,14 +937,14 @@ const int Systeminfo::EventMgr::getWatchType(const long id)
             break;
         }
     }
-
+#ifdef ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT
     for (EventSimList::iterator it = m_eventSimList.begin(); it != m_eventSimList.end(); it++) {
         if (id == (*it)->getId()) {
             event = *it;
             break;
         }
     }
-
+#endif
     for (EventDeviceOrientationList::iterator it = m_eventDeviceOrientationList.begin(); it != m_eventDeviceOrientationList.end(); it++) {
         if (id == (*it)->getId()) {
             event = *it;
@@ -926,12 +959,14 @@ const int Systeminfo::EventMgr::getWatchType(const long id)
         }
     }
 
+#ifdef ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT
     for (EventSimList::iterator it = m_eventSimList.begin(); it != m_eventSimList.end(); it++) {
         if (id == (*it)->getId()) {
             event = *it;
             break;
         }
     }
+#endif
 
     for (EventLocaleList::iterator it = m_eventLocaleList.begin(); it != m_eventLocaleList.end(); it++) {
         if (id == (*it)->getId()) {
@@ -975,11 +1010,12 @@ EventWifiNetworkList Systeminfo::EventMgr::getEventWifiNetworkList()
     return m_eventWifiNetworkList;
 }
 
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
 EventCellularNetworkList Systeminfo::EventMgr::getEventCellularNetworkList()
 {
     return m_eventCelluarNetworkList;
 }
-
+#endif
 EventStorageList Systeminfo::EventMgr::getEventStorageList()
 {
     return m_eventStorageList;
@@ -994,12 +1030,12 @@ EventDeviceOrientationList Systeminfo::EventMgr::getEventDeviceOrientationList()
 {
     return m_eventDeviceOrientationList;
 }
-
+#ifdef ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT
 EventSimList Systeminfo::EventMgr::getEventSimList()
 {
     return m_eventSimList;
 }
-
+#endif
 EventLocaleList Systeminfo::EventMgr::getEventLocaleList()
 {
     return m_eventLocaleList;
@@ -1168,6 +1204,7 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(Network) {
     if (connectionType == CONNECTION_TYPE_WIFI) {
         LoggerD("wifi network");
         Network->networkType= "WIFI";
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
     } else if (connectionType == CONNECTION_TYPE_CELLULAR) {
         if (vconf_get_int(VCONFKEY_TELEPHONY_SVCTYPE, &networkType) == 0) {
             if (networkType < VCONFKEY_TELEPHONY_SVCTYPE_2G) {
@@ -1184,6 +1221,7 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(Network) {
                 Network->networkType= "NONE";
             }
         }
+#endif
     } else {
         Network->networkType= "NONE";
     }
@@ -1233,7 +1271,7 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(WifiNetwork) {
 
     return JSWifiNetworkInfo::createJSObject(context, wifiNetwork);
 }
-
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
 PROPERTY_GET_SYSTEMINFO_DEFINITION(CellularNetwork) {
     Converter converter(context);
     CellularNetworkPropertiesPtr cellularNetwork(new CellularNetworkProperties());
@@ -1287,7 +1325,6 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(CellularNetwork) {
     if (connection_get_type(connectionHandle, &connectionType) != CONNECTION_ERROR_NONE) {
         return JSCellularNetworkInfo::createJSObject(context, cellularNetwork);
     }
-
     if (connectionType == CONNECTION_TYPE_CELLULAR) {
         cellularNetwork->status = "ON";
         if (connection_get_current_profile(connectionHandle, &profileHandle) == CONNECTION_ERROR_NONE) {
@@ -1321,13 +1358,15 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(CellularNetwork) {
 
     return JSCellularNetworkInfo::createJSObject(context, cellularNetwork);
 }
+#endif
 
+#ifdef ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT
 PROPERTY_GET_SYSTEMINFO_DEFINITION(SIM) {
     Converter converter(context);
     SIMPropertiesPtr SIM(new SIMProperties());
     return JSSIMInfo::createJSObject(context, SIM);
 }
-
+#endif
 PROPERTY_GET_SYSTEMINFO_DEFINITION(DeviceOrientation) {
     LoggerD("enter");
     Converter converter(context);
index 01d0b89..714603c 100755 (executable)
@@ -47,11 +47,15 @@ enum {
     WATCH_TYPE_BATTERY = 1,
     WATCH_TYPE_DISPLAY = 2,
     WATCH_TYPE_WIFINETWORK = 3,
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
     WATCH_TYPE_CELLULARNETWORK = 4,
+#endif
     WATCH_TYPE_NETWORK = 5,
     WATCH_TYPE_STORAGE = 6,
     WATCH_TYPE_CPU = 8,
+#ifdef ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT
     WATCH_TYPE_SIM = 9,
+#endif
     WATCH_TYPE_DEVICE_ORIENTATION = 10,
     WATCH_TYPE_PERIPHERAL = 11,
     WATCH_TYPE_LOCALE = 12,
@@ -61,7 +65,9 @@ enum {
 enum {
     REGIST_NOT = 0,
     REGIST_WIFI = 1,
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
     REGIST_CELLULAR =2,
+#endif
     REGIST_ALL = 3
 };
 
@@ -103,8 +109,12 @@ PROPERTY_DECLARATION(Storage, "STORAGE", WATCH_TYPE_STORAGE)
 PROPERTY_DECLARATION(Display, "DISPLAY", WATCH_TYPE_DISPLAY)
 PROPERTY_DECLARATION(Network, "NETWORK", WATCH_TYPE_NETWORK)
 PROPERTY_DECLARATION(WifiNetwork, "WIFI_NETWORK", WATCH_TYPE_WIFINETWORK)
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
 PROPERTY_DECLARATION(CellularNetwork, "CELLULAR_NETWORK", WATCH_TYPE_CELLULARNETWORK)
+#endif
+#ifdef ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT
 PROPERTY_DECLARATION(SIM, "SIM", WATCH_TYPE_SIM)
+#endif
 PROPERTY_DECLARATION(DeviceOrientation, "DEVICE_ORIENTATION", WATCH_TYPE_DEVICE_ORIENTATION)
 PROPERTY_DECLARATION(Build, "BUILD", WATCH_TYPE_UNKNOWN)
 PROPERTY_DECLARATION(Locale, "LOCALE", WATCH_TYPE_LOCALE)
@@ -114,10 +124,14 @@ typedef std::list<EventWatchSysteminfoPtr> EventBatteryList;
 typedef std::list<EventWatchSysteminfoPtr> EventDisplayList;
 typedef std::list<EventWatchSysteminfoPtr> EventNetworkList;
 typedef std::list<EventWatchSysteminfoPtr> EventWifiNetworkList;
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
 typedef std::list<EventWatchSysteminfoPtr> EventCellularNetworkList;
+#endif
 typedef std::list<EventWatchSysteminfoPtr> EventStorageList;
 typedef std::list<EventWatchSysteminfoPtr> EventCpuList;
+#ifdef ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT
 typedef std::list<EventWatchSysteminfoPtr> EventSimList;
+#endif
 typedef std::list<EventWatchSysteminfoPtr> EventDeviceOrientationList;
 typedef std::list<EventWatchSysteminfoPtr> EventLocaleList;
 typedef std::list<EventWatchSysteminfoPtr> EventPeripheralList;
@@ -153,10 +167,14 @@ class Systeminfo : public ISysteminfo
         EventDisplayList getEventDisplayList();
         EventNetworkList getEventNetworkList();
         EventWifiNetworkList getEventWifiNetworkList();
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
         EventCellularNetworkList getEventCellularNetworkList();
+#endif
         EventStorageList getEventStorageList();
         EventCpuList getEventCpuList();
+#ifdef ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT
         EventSimList getEventSimList();
+#endif
         EventDeviceOrientationList getEventDeviceOrientationList();
         EventLocaleList getEventLocaleList();
         EventPeripheralList getEventPeripheralList();
@@ -166,10 +184,14 @@ class Systeminfo : public ISysteminfo
         EventDisplayList m_eventDisplayList;
         EventNetworkList m_eventNetworkList;
         EventWifiNetworkList m_eventWifiNetworkList;
+#ifdef ENABLE_OPTIONAL_SYSINFO_CELLULAR_NETWORK_MNGT
         EventCellularNetworkList m_eventCelluarNetworkList;
+#endif
         EventStorageList m_eventStorageList;
         EventCpuList m_eventCpuList;
+#ifdef ENABLE_OPTIONAL_SYSINFO_TEL_SIM_MNGT
         EventSimList m_eventSimList;
+#endif
         EventDeviceOrientationList m_eventDeviceOrientationList;
         EventLocaleList m_eventLocaleList;
         EventPeripheralList m_eventPeripheralList;