Clean makefile and fix provider
authorJoohyun Kim <joohyune.kim@samsung.com>
Thu, 11 Jul 2013 11:46:47 +0000 (20:46 +0900)
committerJoohyun Kim <joohyune.kim@samsung.com>
Thu, 11 Jul 2013 11:46:47 +0000 (20:46 +0900)
Change-Id: I623567620be985235c7c14a19d2807a38efa74e9
Signed-off-by: Joohyun Kim <joohyune.kim@samsung.com>
src/CMakeLists.txt
src/system-server/CMakeLists.txt
src/system-server/setting/FSys_SettingInfo.cpp
src/system-server/setting/providers/FSys_SettingNetworkProvider.cpp

index e136c33..5a9f9a6 100755 (executable)
@@ -50,7 +50,6 @@ FOREACH(flag ${pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-
 ## Add SubModules
 ADD_SUBDIRECTORY(newlib-compat)
 ADD_SUBDIRECTORY(app)
@@ -64,3 +63,4 @@ ADD_SUBDIRECTORY(appfw)
 ADD_SUBDIRECTORY(osp-string)
 ADD_SUBDIRECTORY(server osp-appfw-server)
 ADD_SUBDIRECTORY(system-server osp-system-server)
+
index 85ba624..d9f0c63 100644 (file)
@@ -1,17 +1,6 @@
 SET (this_target osp-system-server)
 
 INCLUDE_DIRECTORIES (
-       /usr/include/sysman
-       /usr/include/elementary-1
-       /usr/include/eet-1
-       /usr/include/ecore-1
-       /usr/include/evas-1
-       /usr/include/edje-1
-       /usr/include/e_dbus-1
-       /usr/include/efreet-1
-       /usr/include/ethumb-1
-       /usr/include/libxml
-       /usr/include/telephony
        ${SLP_INCLUDE_DIRS}
        ${CMAKE_SOURCE_DIR}
        ${CMAKE_SOURCE_DIR}/inc
@@ -44,7 +33,7 @@ INCLUDE(FindPkgConfig)
 pkg_check_modules(system_pkgs REQUIRED
        capi-media-sound-manager
        capi-network-bluetooth
-       capi-network-wifi
+       capi-network-wifi
        capi-network-tethering
        capi-system-device
        capi-system-info
@@ -67,10 +56,6 @@ FOREACH(flag ${system_pkgs_CFLAGS})
         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-FOREACH(ldflag ${system_pkgs_LDFLAGS})
-       SET(EXTRA_LDFLAGS "${EXTRA_LDFLAGS} ${flag}")
-ENDFOREACH(ldflag)
-
 ## SET EXTRA COMPILER FLAGS
 SET(EXTRA_CFLAGS  "${EXTRA_CFLAGS} -fPIC -Wall" )
 
@@ -88,12 +73,6 @@ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -
 
 TARGET_LINK_LIBRARIES(${this_target} osp-appfw)
 TARGET_LINK_LIBRARIES(${this_target} ${system_pkgs_LDFLAGS})
-TARGET_LINK_LIBRARIES(${this_target} capi-network-tethering)
-TARGET_LINK_LIBRARIES(${this_target} capi-network-bluetooth)
-TARGET_LINK_LIBRARIES(${this_target} capi-network-wifi)
-TARGET_LINK_LIBRARIES(${this_target} capi-media-sound-manager)
-TARGET_LINK_LIBRARIES(${this_target} wifi-direct)
-TARGET_LINK_LIBRARIES(${this_target} sysman)
 
 SET_TARGET_PROPERTIES(${this_target}
                PROPERTIES
index acf9a0b..39f8633 100644 (file)
@@ -98,7 +98,7 @@ _SettingInfo::_SettingInfo()
 
        _SettingLocaleProvider* localeProvider = new (std::nothrow) _SettingLocaleProvider();
        RegisterProvider(_SETTING_LOCALE_PROVIDER, (_ISettingProvider*)localeProvider);
-       
+
        _SettingLocationProvider* locationProvider = new (std::nothrow) _SettingLocationProvider();
        RegisterProvider(_SETTING_LOCATION_PROVIDER, (_ISettingProvider*)locationProvider);
 
@@ -114,7 +114,7 @@ _SettingInfo::_SettingInfo()
 
        _SettingSpeechProvider* speechProvider = new (std::nothrow) _SettingSpeechProvider();
        RegisterProvider(_SETTING_SPEECH_PROVIDER, (_ISettingProvider*)speechProvider);
-       
+
        _SettingStorageProvider* storageProvider = new (std::nothrow) _SettingStorageProvider();
        RegisterProvider(_SETTING_STORAGE_PROVIDER, (_ISettingProvider*)storageProvider);
 
@@ -133,8 +133,10 @@ _SettingInfo::~_SettingInfo()
        UnregisterProvider(_SETTING_DEVELOPER_PROVIDER);
        UnregisterProvider(_SETTING_BATTERY_PROVIDER);
        UnregisterProvider(_SETTING_GRAPHICS_PROVIDER);
+       RemoveProvider(_SETTING_DEVICE_NAME_PROVIDER);
        RemoveProvider(_SETTING_LOCALE_PROVIDER);
        RemoveProvider(_SETTING_LOCATION_PROVIDER);
+       UnregisterProvider(_SETTING_USB_PROVIDER);
        RemoveProvider(_SETTING_NETWORK_PROVIDER);
        RemoveProvider(_SETTING_SCREEN_PROVIDER);
        RemoveProvider(_SETTING_SOUND_PROVIDER);
@@ -207,7 +209,7 @@ _SettingInfo::GetProvider(const String& key)
                return null;
        }
 
-       return provider;        
+       return provider;
 }
 
 result
@@ -278,7 +280,7 @@ _SettingInfo::RemoveSettingEventListener(ISettingEventListener& listener)
 
 result
 _SettingInfo::AnnounceSettingEvent(const String& key)
-{      
+{
        IEnumeratorT< ISettingEventListener*>* pEnum = __settingEventList.GetEnumeratorN();
        SysTryReturnResult(NID_SYS, pEnum != null, E_SYSTEM, "It is failed to get event listener list.");
 
@@ -292,9 +294,7 @@ _SettingInfo::AnnounceSettingEvent(const String& key)
                {
                        String eventKey = key;
                        pEventListener->OnSettingChanged(eventKey);
-
                        SysLog(NID_SYS, "Event is delivered to %x.", pEventListener);
-                       
                }
        }
 
index e447b21..f67b131 100644 (file)
@@ -1071,6 +1071,7 @@ _SettingNetworkProvider::HasKey(const String& key)
        {
                bool isSupported = false;
                int errorCode = system_info_get_value_bool(SYSTEM_INFO_KEY_TETHERING_SUPPORTED, &isSupported);
+
                if(errorCode == SYSTEM_INFO_ERROR_NONE && isSupported == true)
                {
                        return true;