Made sub folder below src 59/208259/1
authorKiseok Chang <kiso.chang@samsung.com>
Thu, 20 Jun 2019 11:08:08 +0000 (20:08 +0900)
committerKiseok Chang <kiso.chang@samsung.com>
Thu, 20 Jun 2019 11:09:29 +0000 (20:09 +0900)
- added "common" and "settings" folders

Change-Id: Ib494239b0cb90e88a6aabcbb35f42ba9cfa9ece6
Signed-off-by: Kiseok Chang <kiso.chang@samsung.com>
34 files changed:
CMakeLists.txt
src/CMakeLists.txt
src/common/GenSettingMenu.cpp [moved from src/GenSettingMenu.cpp with 94% similarity]
src/common/GenSettingMenu.h [moved from src/GenSettingMenu.h with 100% similarity]
src/common/SettingCommand.cpp [moved from src/SettingCommand.cpp with 97% similarity]
src/common/SettingCommand.h [moved from src/SettingCommand.h with 100% similarity]
src/common/SettingMenu.cpp [moved from src/SettingMenu.cpp with 86% similarity]
src/common/SettingMenu.h [moved from src/SettingMenu.h with 84% similarity]
src/common/sc-debug.h [moved from include/settingcmd-debug.h with 100% similarity]
src/sc_main.cpp [moved from src/setting_cmd.cpp with 87% similarity]
src/settings/sc_aboutdevice.cpp [moved from src/sc_aboutdevice.cpp with 93% similarity]
src/settings/sc_aboutdevice.h [moved from src/sc_aboutdevice.h with 82% similarity]
src/settings/sc_airplane.cpp [moved from src/sc_airplane.cpp with 84% similarity]
src/settings/sc_airplane.h [moved from src/sc_airplane.h with 81% similarity]
src/settings/sc_apps.cpp [moved from src/sc_apps.cpp with 98% similarity]
src/settings/sc_apps.h [moved from src/sc_apps.h with 80% similarity]
src/settings/sc_battery.cpp [moved from src/sc_battery.cpp with 98% similarity]
src/settings/sc_battery.h [moved from src/sc_battery.h with 84% similarity]
src/settings/sc_bluetooth.cpp [moved from src/sc_bluetooth.cpp with 87% similarity]
src/settings/sc_bluetooth.h [moved from src/sc_bluetooth.h with 82% similarity]
src/settings/sc_common.cpp [moved from src/sc_common.cpp with 97% similarity]
src/settings/sc_common.h [moved from src/sc_common.h with 100% similarity]
src/settings/sc_datausage.cpp [moved from src/sc_datausage.cpp with 97% similarity]
src/settings/sc_datausage.h [moved from src/sc_datausage.h with 82% similarity]
src/settings/sc_datetime.cpp [moved from src/sc_datetime.cpp with 91% similarity]
src/settings/sc_datetime.h [moved from src/sc_datetime.h with 81% similarity]
src/settings/sc_display.cpp [moved from src/sc_display.cpp with 89% similarity]
src/settings/sc_display.h [moved from src/sc_display.h with 81% similarity]
src/settings/sc_sound.cpp [moved from src/sc_sound.cpp with 91% similarity]
src/settings/sc_sound.h [moved from src/sc_sound.h with 80% similarity]
src/settings/sc_storage.cpp [moved from src/sc_storage.cpp with 94% similarity]
src/settings/sc_storage.h [moved from src/sc_storage.h with 81% similarity]
src/settings/sc_wifi.cpp [moved from src/sc_wifi.cpp with 82% similarity]
src/settings/sc_wifi.h [moved from src/sc_wifi.h with 80% similarity]

index 85f48cd..b91e6d9 100644 (file)
@@ -26,6 +26,7 @@ INCLUDE(Definitions.cmake)
 
 #setting main view build start
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/src/common)
 #INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.setting-cmd.xml DESTINATION /usr/share/packages/)
 
 # setting bin
index 5b1b30f..dec6467 100644 (file)
@@ -60,22 +60,22 @@ ADD_DEFINITIONS("-DXP_UNIX")
 SET(BIN_NAME "setting-cmd")
 
 ADD_EXECUTABLE(${BIN_NAME}
-       ./SettingCommand.cpp
-       ./SettingMenu.cpp
-       ./GenSettingMenu.cpp
-       ./setting_cmd.cpp
-       ./sc_common.cpp
-       ./sc_aboutdevice.cpp
-       ./sc_sound.cpp
-       ./sc_display.cpp
-       ./sc_apps.cpp
-       ./sc_datetime.cpp
-       ./sc_wifi.cpp
-       ./sc_bluetooth.cpp
-       ./sc_airplane.cpp
-       ./sc_storage.cpp
-       ./sc_battery.cpp
-       ./sc_datausage.cpp
+       ./sc_main.cpp
+       common/SettingCommand.cpp
+       common/SettingMenu.cpp
+       common/GenSettingMenu.cpp
+       settings/sc_common.cpp
+       settings/sc_aboutdevice.cpp
+       settings/sc_sound.cpp
+       settings/sc_display.cpp
+       settings/sc_apps.cpp
+       settings/sc_datetime.cpp
+       settings/sc_wifi.cpp
+       settings/sc_bluetooth.cpp
+       settings/sc_airplane.cpp
+       settings/sc_storage.cpp
+       settings/sc_battery.cpp
+       settings/sc_datausage.cpp
        )
 
 # dmalloc
similarity index 94%
rename from src/GenSettingMenu.cpp
rename to src/common/GenSettingMenu.cpp
index 4d9b556..6e26027 100644 (file)
@@ -1,5 +1,5 @@
-#include "GenSettingMenu.h"
-#include <settingcmd-debug.h>
+#include <GenSettingMenu.h>
+#include <sc-debug.h>
 
 using namespace std;
 
@@ -26,7 +26,7 @@ MENURUN_ERROR GenSettingMenu::func(string &title, int argc, char *argv[])
                return (*ptrFunc)(argc, argv, this);
        }
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 bool GenSettingMenu::isImplemented()
 {
similarity index 97%
rename from src/SettingCommand.cpp
rename to src/common/SettingCommand.cpp
index 9b936f1..8e1f983 100644 (file)
@@ -1,5 +1,5 @@
 #include "SettingCommand.h"
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 #include <sstream>
 
@@ -8,13 +8,12 @@ using namespace std;
 SettingCommand::SettingCommand(string& execstr, string& commandstr)
 {
        eprintf("Entered into SettingCommand()\n");
-       
+
        string token = execstr;
        stringstream ss_exec(execstr);
        while (getline(ss_exec, token, '/')) {}
        settingCommands.push_back(token);
 
-
        stringstream ss_cmd(commandstr);
        eprintf("%s  %s (", execstr.c_str(), commandstr.c_str());
        while (getline(ss_cmd, token, '/')) {
@@ -35,7 +34,7 @@ bool SettingCommand::next()
 {
        int cmdcount = count();
        if (curPos >= cmdcount - 1) return false;
-       
+
        curPos++;
        return true;
 }
@@ -43,7 +42,7 @@ bool SettingCommand::next()
 bool SettingCommand::prev()
 {
        if (curPos <= 0) return false;
-       
+
        curPos--;
        return true;
 }
@@ -57,7 +56,7 @@ void SettingCommand::first()
 void SettingCommand::last()
 {
        curPos = 0;
-       
+
        int cmdcount = count();
        if (cmdcount > 0) curPos = cmdcount - 1;
 }
similarity index 86%
rename from src/SettingMenu.cpp
rename to src/common/SettingMenu.cpp
index 9740097..7bf6599 100644 (file)
@@ -1,5 +1,5 @@
 #include "SettingMenu.h"
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 #include <algorithm>
 #include <list>
@@ -38,14 +38,14 @@ MENURUN_ERROR SettingMenu::run(SettingCommand &settingcmds, string &title, int a
 
        title += string(" - ") + name();
        MENURUN_ERROR result = func(title, argc, argv);
-       if (result != MEMUFUNC_ERR_NONE) return result;
+       if (result != MENURUN_ERR_NONE) return result;
 
-       if (subMenus.empty()) return MEMUFUNC_ERR_NONE;
+       if (subMenus.empty()) return MENURUN_ERR_NONE;
 
 
        if (!settingcmds.next()) {
                printUsage(settingcmds);
-               return MEMUFUNC_ERR_ARG_SHORT;
+               return MENURUN_ERR_ARG_SHORT;
        }
        string curcmd = settingcmds.curCommand();
        auto it = find_if(subMenus.begin(), subMenus.end(),
@@ -58,7 +58,7 @@ MENURUN_ERROR SettingMenu::run(SettingCommand &settingcmds, string &title, int a
                eprintf("%s is not a valid command.\n\n", curcmd.c_str());
                printUsage(settingcmds);
                settingcmds.prev();
-               return MEMUFUNC_ERR_ARG_INVAILD;
+               return MENURUN_ERR_ARG_INVAILD;
        }
 
        eprintf("command %s is founded.\n", curcmd.c_str());
@@ -71,7 +71,7 @@ MENURUN_ERROR SettingMenu::run(SettingCommand &settingcmds, string &title, int a
 MENURUN_ERROR SettingMenu::func(string &title, int argc, char *argv[])
 {
        eprintf("func() of %s\n", name());
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 void SettingMenu::printUsage(SettingCommand &settingcmds)
@@ -96,16 +96,16 @@ void SettingMenu::printError(MENURUN_ERROR error)
 {
        printf("[SettingMenu Error] ");
        switch (error) {
-       case MEMUFUNC_ERR_NORMAL:
+       case MENURUN_ERR_NORMAL:
                printf("Normal error");
                break;
-       case MEMUFUNC_ERR_ARG_SHORT:
+       case MENURUN_ERR_ARG_SHORT:
                printf("Lack of arguments");
                break;
-       case MEMUFUNC_ERR_ARG_INVAILD:
+       case MENURUN_ERR_ARG_INVAILD:
                printf("Invalid argument");
                break;
-       case MEMUFUNC_ERR_NOTIMPL:
+       case MENURUN_ERR_NOTIMPL:
                printf("Not implemented");
                break;
        default:
similarity index 84%
rename from src/SettingMenu.h
rename to src/common/SettingMenu.h
index 7985db3..b2e1036 100644 (file)
@@ -7,11 +7,11 @@
 #include <list>
 
 enum MENURUN_ERROR {
-       MEMUFUNC_ERR_NONE = 0,
-       MEMUFUNC_ERR_NORMAL = -1,
-       MEMUFUNC_ERR_ARG_SHORT = -2,
-       MEMUFUNC_ERR_ARG_INVAILD = -3,
-       MEMUFUNC_ERR_NOTIMPL = -4
+       MENURUN_ERR_NONE = 0,
+       MENURUN_ERR_NORMAL = -1,
+       MENURUN_ERR_ARG_SHORT = -2,
+       MENURUN_ERR_ARG_INVAILD = -3,
+       MENURUN_ERR_NOTIMPL = -4
 };
 
 class SettingMenu
@@ -23,8 +23,8 @@ public:
 public:
        virtual bool create();
        virtual void destroy();
-       virtual MENURUN_ERROR run(SettingCommand &settingcmds, std::string &title, int argc, char *argv[]);
 
+       virtual MENURUN_ERROR run(SettingCommand &settingcmds, std::string &title, int argc, char *argv[]);
        virtual MENURUN_ERROR func(std::string &title, int argc, char *argv[]);
 
        virtual bool isImplemented() { return false; }
similarity index 87%
rename from src/setting_cmd.cpp
rename to src/sc_main.cpp
index 6fe8d3d..1d3b12f 100644 (file)
@@ -1,18 +1,18 @@
-#include <settingcmd-debug.h>
-
-#include "GenSettingMenu.h"
-#include "sc_common.h"
-#include "sc_aboutdevice.h"
-#include "sc_sound.h"
-#include "sc_display.h"
-#include "sc_apps.h"
-#include "sc_datetime.h"
-#include "sc_wifi.h"
-#include "sc_bluetooth.h"
-#include "sc_airplane.h"
-#include "sc_storage.h"
-#include "sc_datausage.h"
-#include "sc_battery.h"
+#include <sc-debug.h>
+
+#include <GenSettingMenu.h>
+#include "settings/sc_common.h"
+#include "settings/sc_aboutdevice.h"
+#include "settings/sc_sound.h"
+#include "settings/sc_display.h"
+#include "settings/sc_apps.h"
+#include "settings/sc_datetime.h"
+#include "settings/sc_wifi.h"
+#include "settings/sc_bluetooth.h"
+#include "settings/sc_airplane.h"
+#include "settings/sc_storage.h"
+#include "settings/sc_datausage.h"
+#include "settings/sc_battery.h"
 
 #include <stdio.h>
 #include <string>
@@ -115,7 +115,7 @@ void MainMemu_Precreate(GenSettingMenu *menu)
 {
        int profile = getProfile();
        if (profile < 0) {
-               SettingMenu::printError(MEMUFUNC_ERR_NORMAL);
+               SettingMenu::printError(MENURUN_ERR_NORMAL);
                return;
        }
 
@@ -126,7 +126,7 @@ void MainMemu_Precreate(GenSettingMenu *menu)
                menu->addSubmenus(wearable_main_menulist, sizeof(wearable_main_menulist) / sizeof(MenuItem));
        }
        else {
-               SettingMenu::printError(MEMUFUNC_ERR_NORMAL);
+               SettingMenu::printError(MENURUN_ERR_NORMAL);
        }
 }
 
@@ -149,7 +149,7 @@ int main(int argc, char *argv[])
        string title = "\nSeting Command\n";
 
        MENURUN_ERROR result = mainMenu.run(settingcommands, title, argc - 2, &argv[2]);
-       if (result != MEMUFUNC_ERR_NONE) {
+       if (result != MENURUN_ERR_NONE) {
                SettingMenu::printError(result);
        }
        mainMenu.destroy();
similarity index 93%
rename from src/sc_aboutdevice.cpp
rename to src/settings/sc_aboutdevice.cpp
index 91e9a51..2915316 100644 (file)
@@ -1,5 +1,5 @@
 #include "sc_aboutdevice.h"
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -23,7 +23,7 @@
 
 #include <storage.h>
 
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 
 #define SETTING_ABOUT_POWER_SUPPLY_PATH "/sys/class/power_supply"
@@ -130,7 +130,7 @@ static MENURUN_ERROR menufunc_ad_name(int argc, char *argv[], GenSettingMenu *me
        printf("%s\n", name_value);
        free(name_value);
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_ad_mn(int argc, char *argv[], GenSettingMenu *menu)
@@ -142,7 +142,7 @@ static MENURUN_ERROR menufunc_ad_mn(int argc, char *argv[], GenSettingMenu *menu
        printf("\tModel number : ");
        printf("%s\n", str);
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_ad_ver(int argc, char *argv[], GenSettingMenu *menu)
@@ -154,7 +154,7 @@ static MENURUN_ERROR menufunc_ad_ver(int argc, char *argv[], GenSettingMenu *men
        printf("\tModel number : ");
        printf("%s\n", str);
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_ad_cpu(int argc, char *argv[], GenSettingMenu *menu)
@@ -166,7 +166,7 @@ static MENURUN_ERROR menufunc_ad_cpu(int argc, char *argv[], GenSettingMenu *men
        printf("\tModel number : ");
        printf("%s\n", str);
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_ad_ram(int argc, char *argv[], GenSettingMenu *menu)
@@ -184,7 +184,7 @@ static MENURUN_ERROR menufunc_ad_ram(int argc, char *argv[], GenSettingMenu *men
        printf("\tRAM : ");
        printf("%s\n", str);
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_ad_res(int argc, char *argv[], GenSettingMenu *menu)
@@ -206,7 +206,7 @@ static MENURUN_ERROR menufunc_ad_res(int argc, char *argv[], GenSettingMenu *men
        printf("\tResolution : ");
        printf("%s\n", str);
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 /* sim_number is started from 1, ex) SIM1, SIM2, SIM3 ... */
 static MENURUN_ERROR _get_sim_phone_number(int sim_number, char * str, int str_size)
@@ -216,16 +216,16 @@ static MENURUN_ERROR _get_sim_phone_number(int sim_number, char * str, int str_s
        int ret = 0;
        if (telephony_init(&tel_h_list) != TELEPHONY_ERROR_NONE) {
                eprintf("telephony_init failed");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        if ((int)tel_h_list.count < sim_number-1) {
                printf("\tThere is no SIM%d card\n", sim_number);
                if (telephony_deinit(&tel_h_list) != TELEPHONY_ERROR_NONE) {
                        eprintf("telephony_deinit failed");
-                       return MEMUFUNC_ERR_NORMAL;
+                       return MENURUN_ERR_NORMAL;
                }
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        ret = telephony_sim_get_subscriber_number(tel_h_list.handle[sim_number-1], &phone_num);
@@ -236,17 +236,17 @@ static MENURUN_ERROR _get_sim_phone_number(int sim_number, char * str, int str_s
                printf("\tThere is no SIM%d card, ret:%d phone_num addr:0x%x\n", sim_number, ret, (unsigned int)phone_num);
                if (telephony_deinit(&tel_h_list) != TELEPHONY_ERROR_NONE) {
                        eprintf("telephony_deinit failed");
-                       return MEMUFUNC_ERR_NORMAL;
+                       return MENURUN_ERR_NORMAL;
                }
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        if (telephony_deinit(&tel_h_list) != TELEPHONY_ERROR_NONE) {
                eprintf("telephony_deinit failed");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 
@@ -254,7 +254,7 @@ static MENURUN_ERROR menufunc_ad_sim1(int argc, char *argv[], GenSettingMenu *me
 {
        char str[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO];
        MENURUN_ERROR ret = _get_sim_phone_number(1, str, sizeof(str));
-       if (ret != MEMUFUNC_ERR_NONE)
+       if (ret != MENURUN_ERR_NONE)
                return ret;
        printf("\tSIM1 Phone Number : ");
        printf("%s\n", str);
@@ -266,7 +266,7 @@ static MENURUN_ERROR menufunc_ad_sim2(int argc, char *argv[], GenSettingMenu *me
 {
        char str[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO];
        MENURUN_ERROR ret = _get_sim_phone_number(2, str, sizeof(str));
-       if (ret != MEMUFUNC_ERR_NONE)
+       if (ret != MENURUN_ERR_NONE)
                return ret;
        printf("\tSIM2 Phone Number : ");
        printf("%s\n", str);
@@ -281,16 +281,16 @@ static MENURUN_ERROR _get_sim_ime(int sim_number, char * str, int str_size)
 
        if (telephony_init(&tel_h_list) != TELEPHONY_ERROR_NONE) {
                eprintf("telephony_init failed");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        if ((int)tel_h_list.count < sim_number-1) {
                printf("\tThere is no SIM%d card\n", sim_number);
                if (telephony_deinit(&tel_h_list) != TELEPHONY_ERROR_NONE) {
                        eprintf("telephony_deinit failed");
-                       return MEMUFUNC_ERR_NORMAL;
+                       return MENURUN_ERR_NORMAL;
                }
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        int ret = telephony_modem_get_imei(tel_h_list.handle[sim_number-1], &ime_buffer);
@@ -301,24 +301,24 @@ static MENURUN_ERROR _get_sim_ime(int sim_number, char * str, int str_size)
                printf("\tThere is no SIM%d card, ret:%d ime_buffer addr:0x%x\n", sim_number, ret, (unsigned int)ime_buffer);
                if (telephony_deinit(&tel_h_list) != TELEPHONY_ERROR_NONE) {
                        eprintf("telephony_deinit failed");
-                       return MEMUFUNC_ERR_NORMAL;
+                       return MENURUN_ERR_NORMAL;
                }
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        if (telephony_deinit(&tel_h_list) != TELEPHONY_ERROR_NONE) {
                eprintf("telephony_deinit failed");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_ad_ime1(int argc, char *argv[], GenSettingMenu *menu)
 {
        char str[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO];
        MENURUN_ERROR ret = _get_sim_ime(1, str, sizeof(str));
-       if (ret != MEMUFUNC_ERR_NONE)
+       if (ret != MENURUN_ERR_NONE)
                return ret;
        printf("\tIME1 : ");
        printf("%s\n", str);
@@ -329,7 +329,7 @@ static MENURUN_ERROR menufunc_ad_ime2(int argc, char *argv[], GenSettingMenu *me
 {
        char str[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO];
        MENURUN_ERROR ret = _get_sim_ime(2, str, sizeof(str));
-       if (ret != MEMUFUNC_ERR_NONE)
+       if (ret != MENURUN_ERR_NONE)
                return ret;
        printf("\tIME2 : ");
        printf("%s\n", str);
@@ -360,7 +360,7 @@ static MENURUN_ERROR menufunc_ad_bta(int argc, char *argv[], GenSettingMenu *men
        }
        printf("\tBluetooth address : ");
        printf("%s\n", str);
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_ad_wfa(int argc, char *argv[], GenSettingMenu *menu)
@@ -373,7 +373,7 @@ static MENURUN_ERROR menufunc_ad_wfa(int argc, char *argv[], GenSettingMenu *men
        /* get wifi handle */
        int ret = wifi_manager_initialize(&wifi_handle);
        if (ret != WIFI_MANAGER_ERROR_NONE)
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
 
        /* get wifi mac address */
        ret = wifi_manager_get_mac_address(wifi_handle, &mac_addr);
@@ -389,10 +389,10 @@ static MENURUN_ERROR menufunc_ad_wfa(int argc, char *argv[], GenSettingMenu *men
        /* release wifi handle */
        ret = wifi_manager_deinitialize(wifi_handle);
        if (ret != WIFI_MANAGER_ERROR_NONE)
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        printf("\tWIFI address : ");
        printf("%s\n", str);
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_ad_sto(int argc, char *argv[], GenSettingMenu *menu)
@@ -406,7 +406,7 @@ static MENURUN_ERROR menufunc_ad_sto(int argc, char *argv[], GenSettingMenu *men
        if (storage_get_internal_memory_size(&internal) < 0) {
                eprintf("Fail to get internal memory size\n");
                snprintf(str, sizeof(str), "internal storage is unavailable!\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        } else {
                total = (long long int)internal.f_frsize
                                * (long long int)internal.f_blocks;
@@ -427,14 +427,14 @@ static MENURUN_ERROR menufunc_ad_sto(int argc, char *argv[], GenSettingMenu *men
        if (total < 0 || avail < 0 || total < avail) {
                eprintf("Fail to get internal memory size\n");
                snprintf(str, sizeof(str), "external storage is unavailable!\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
        snprintf(str, sizeof(str), "%0.1fGB available (Total %0.1fGB)",
                (double)(avail / 1000000000.0), (double)(total / 1000000000.0));
        printf("\tStorage Size : ");
        printf("%s\n", str);
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_ad_batt(int argc, char *argv[], GenSettingMenu *menu)
@@ -468,7 +468,7 @@ static MENURUN_ERROR menufunc_ad_batt(int argc, char *argv[], GenSettingMenu *me
                eprintf("open file fail\n");
                snprintf(str, sizeof(str), "%s unavailable!\n", SETTING_ABOUT_POWER_SUPPLY_PATH);
        }
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static int __stat_get_cpu_usage(float *usr_pct, float *sys_pct)
@@ -576,7 +576,7 @@ static MENURUN_ERROR menufunc_ad_cpuu(int argc, char *argv[], GenSettingMenu *me
 {
        float usr = 0.0;
        float sys = 0.0;
-       MENURUN_ERROR ret = MEMUFUNC_ERR_NONE;
+       MENURUN_ERROR ret = MENURUN_ERR_NONE;
        printf("\tWhen you want to stop checking CPU usage,\n");
        printf("\tPress Ctrl+C\n\n");
 
similarity index 82%
rename from src/sc_aboutdevice.h
rename to src/settings/sc_aboutdevice.h
index 10dde4a..9a9beee 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __SC_ABOUTDEVICE_H_
 #define __SC_ABOUTDEVICE_H_
 
-#include "GenSettingMenu.h"
+#include <GenSettingMenu.h>
 
 void precreate_ad(GenSettingMenu *menu);
 
similarity index 84%
rename from src/sc_airplane.cpp
rename to src/settings/sc_airplane.cpp
index 2ec8b34..b75400c 100644 (file)
@@ -1,5 +1,5 @@
 #include "sc_airplane.h"
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -13,13 +13,13 @@ static MENURUN_ERROR menufunc_am_st(int argc, char *argv[], GenSettingMenu *menu
     bool ret_state = false;
 
        int ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, &ret_state);
-    if( ret != MEMUFUNC_ERR_NONE ) {
+    if( ret != MENURUN_ERR_NONE ) {
         eprintf("\tFlight mode get fail\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
     }
 
        printf("\tFlight mode : %s\n", ret_state? "On" : "Off");
-    return MEMUFUNC_ERR_NONE;
+    return MENURUN_ERR_NONE;
 }
 
 MenuItem am_menulist[] ={
similarity index 81%
rename from src/sc_airplane.h
rename to src/settings/sc_airplane.h
index 6db89b9..79bc868 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __SC_AIRPLANE_H_
 #define __SC_AIRPLANE_H_
 
-#include "GenSettingMenu.h"
+#include <GenSettingMenu.h>
 
 void precreate_am(GenSettingMenu *menu);
 
similarity index 98%
rename from src/sc_apps.cpp
rename to src/settings/sc_apps.cpp
index 0c9895b..381940f 100644 (file)
@@ -1,5 +1,5 @@
 #include "sc_apps.h"
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -189,7 +189,7 @@ static MENURUN_ERROR menufunc_apps_lall(int argc, char *argv[], GenSettingMenu *
 
        apps = appmgr_utils_sort_apps_list(g_sorttype, apps);
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 
similarity index 80%
rename from src/sc_apps.h
rename to src/settings/sc_apps.h
index 2a084a9..06d2da6 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __SC_APPS_H_
 #define __SC_APPS_H_
 
-#include "GenSettingMenu.h"
+#include <GenSettingMenu.h>
 
 void precreate_apps(GenSettingMenu *menu);
 
similarity index 98%
rename from src/sc_battery.cpp
rename to src/settings/sc_battery.cpp
index 571202e..4f4abca 100644 (file)
@@ -1,5 +1,5 @@
 #include "sc_battery.h"
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -119,7 +119,7 @@ MENURUN_ERROR menufunc_ba(int argc, char *argv[], GenSettingMenu *menu)
 
        _get_battery_usage_details_list();
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 
similarity index 84%
rename from src/sc_battery.h
rename to src/settings/sc_battery.h
index c53ebf3..1ce805f 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __SC_BATTERY_H_
 #define __SC_BATTERY_H_
 
-#include "GenSettingMenu.h"
+#include <GenSettingMenu.h>
 
 MENURUN_ERROR menufunc_ba(int argc, char *argv[], GenSettingMenu *menu);
 
similarity index 87%
rename from src/sc_bluetooth.cpp
rename to src/settings/sc_bluetooth.cpp
index ae03269..68fb9f1 100644 (file)
@@ -1,5 +1,5 @@
 #include "sc_bluetooth.h"
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -13,18 +13,18 @@ static MENURUN_ERROR menufunc_bt_st(int argc, char *argv[], GenSettingMenu *menu
 {
        if (bt_initialize() != BT_ERROR_NONE) {
                eprintf("bt_initialize() failed\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
        bt_adapter_state_e bt_state;
        if (bt_adapter_get_state(&bt_state) != BT_ERROR_NONE) {
                eprintf("bt_adapter_get_state() failed\n");
                bt_deinitialize();
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
        bt_deinitialize();
 
        printf("\tState : %s\n", (bt_state == BT_ADAPTER_ENABLED) ? "On" : "Off");
-    return MEMUFUNC_ERR_NONE;
+    return MENURUN_ERR_NONE;
 }
 
 MenuItem bt_menulist[] ={
similarity index 82%
rename from src/sc_bluetooth.h
rename to src/settings/sc_bluetooth.h
index a3dc32b..9e4511f 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __SC_BLUETOOTH_H_
 #define __SC_BLUETOOTH_H_
 
-#include "GenSettingMenu.h"
+#include <GenSettingMenu.h>
 
 void precreate_bt(GenSettingMenu *menu);
 
similarity index 97%
rename from src/sc_common.cpp
rename to src/settings/sc_common.cpp
index a033d26..5e30396 100644 (file)
@@ -1,5 +1,5 @@
 #include "sc_common.h"
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 #include <stdio.h>
 #include <string.h>
similarity index 100%
rename from src/sc_common.h
rename to src/settings/sc_common.h
similarity index 97%
rename from src/sc_datausage.cpp
rename to src/settings/sc_datausage.cpp
index fe86c08..1fd8dae 100644 (file)
@@ -1,5 +1,5 @@
 #include "sc_datausage.h"
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -11,7 +11,7 @@
 #include <app_preference.h>
 #include <stc_internal.h>
 
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 #define TH_POSTFIX_IDX 0
 
@@ -415,7 +415,7 @@ static int safeStrNCmp(const char *s1, const char *s2, int len)
        else if (isEmptyStr(s1))
                return 1;
        else if (isEmptyStr(s2))
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
 
        if (0 == len)
                return 0;
@@ -871,7 +871,7 @@ static MENURUN_ERROR menufunc_du_gmwl(int argc, char *argv[], GenSettingMenu *me
        ret = stc_initialize(&stc);
        if (ret != STC_ERROR_NONE) {
                eprintf("stc_initialize() error: %s\n", get_error_message(ret));
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        multi_main_loop = g_main_loop_new(nullptr, FALSE);
@@ -880,7 +880,7 @@ static MENURUN_ERROR menufunc_du_gmwl(int argc, char *argv[], GenSettingMenu *me
 
        stc_deinitialize(stc);
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_du_smwl(int argc, char *argv[], GenSettingMenu *menu)
@@ -892,7 +892,7 @@ static MENURUN_ERROR menufunc_du_smwl(int argc, char *argv[], GenSettingMenu *me
                printf("Second argument = limit(MB)\n");
                printf("Zero MB means None\n");
 
-               return MEMUFUNC_ERR_ARG_SHORT;
+               return MENURUN_ERR_ARG_SHORT;
        }
 
        telephony_handle_list_s tel_h_list;
@@ -906,22 +906,22 @@ static MENURUN_ERROR menufunc_du_smwl(int argc, char *argv[], GenSettingMenu *me
 
        if (telephony_init(&tel_h_list) != TELEPHONY_ERROR_NONE) {
                eprintf("telephony_init failed");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        if (tel_h_list.count < 0) {
                printf("\tThere is no SIM card\n");
                if (telephony_deinit(&tel_h_list) != TELEPHONY_ERROR_NONE) {
                        eprintf("telephony_deinit failed");
-                       return MEMUFUNC_ERR_NORMAL;
+                       return MENURUN_ERR_NORMAL;
                }
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        ret = stc_initialize(&stc);
        if (ret != STC_ERROR_NONE) {
                eprintf("stc_initialize() error: %s\n", get_error_message(ret));
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
        int available_sim = 0;
        char *subscriber_id[2]; /* Subscriber ID numbers of sim cards*/
@@ -961,12 +961,12 @@ static MENURUN_ERROR menufunc_du_smwl(int argc, char *argv[], GenSettingMenu *me
        stc_deinitialize(stc);
        if (telephony_deinit(&tel_h_list) != TELEPHONY_ERROR_NONE) {
                eprintf("telephony_deinit failed");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        printf("\t\tDone..\n");
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_du_mo(int argc, char *argv[], GenSettingMenu *menu)
@@ -984,7 +984,7 @@ static MENURUN_ERROR menufunc_du_mo(int argc, char *argv[], GenSettingMenu *menu
 
                printf("Second argument = start date (monthly, weekly, daily)\n \t\t\t or interval(custom 1 to 90)\n\n");
 
-               return MEMUFUNC_ERR_ARG_SHORT;
+               return MENURUN_ERR_ARG_SHORT;
        }
 
        telephony_handle_list_s tel_h_list;
@@ -993,16 +993,16 @@ static MENURUN_ERROR menufunc_du_mo(int argc, char *argv[], GenSettingMenu *menu
        int ret = 0;
        if (telephony_init(&tel_h_list) != TELEPHONY_ERROR_NONE) {
                eprintf("telephony_init failed");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        if (tel_h_list.count < 0) {
                printf("\tThere is no SIM card\n");
                if (telephony_deinit(&tel_h_list) != TELEPHONY_ERROR_NONE) {
                        eprintf("telephony_deinit failed");
-                       return MEMUFUNC_ERR_NORMAL;
+                       return MENURUN_ERR_NORMAL;
                }
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        int cycle = atoi(argv[1]);
@@ -1024,7 +1024,7 @@ static MENURUN_ERROR menufunc_du_mo(int argc, char *argv[], GenSettingMenu *menu
        ret = stc_initialize(&stc);
        if (ret != STC_ERROR_NONE) {
                eprintf("stc_initialize() error: %s\n", get_error_message(ret));
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
        int available_sim = 0;
        char *subscriber_id[2]; /* Subscriber ID numbers of sim cards*/
@@ -1062,10 +1062,10 @@ static MENURUN_ERROR menufunc_du_mo(int argc, char *argv[], GenSettingMenu *menu
        stc_deinitialize(stc);
        if (telephony_deinit(&tel_h_list) != TELEPHONY_ERROR_NONE) {
                eprintf("telephony_deinit failed");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_du_wi(int argc, char *argv[], GenSettingMenu *menu)
@@ -1081,7 +1081,7 @@ static MENURUN_ERROR menufunc_du_wi(int argc, char *argv[], GenSettingMenu *menu
 
                printf("Second argument = start date (monthly, weekly, daily)\n \t\t\t or interval(custom 1 to 90)\n\n");
 
-               return MEMUFUNC_ERR_ARG_SHORT;
+               return MENURUN_ERR_ARG_SHORT;
        }
 
        stc_h stc;
@@ -1106,7 +1106,7 @@ static MENURUN_ERROR menufunc_du_wi(int argc, char *argv[], GenSettingMenu *menu
        ret = stc_initialize(&stc);
        if (ret != STC_ERROR_NONE) {
                eprintf("stc_initialize() error: %s\n", get_error_message(ret));
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        multi_main_loop = g_main_loop_new(nullptr, FALSE);
@@ -1119,7 +1119,7 @@ static MENURUN_ERROR menufunc_du_wi(int argc, char *argv[], GenSettingMenu *menu
 
        stc_deinitialize(stc);
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 MenuItem du_menulist[] ={
similarity index 82%
rename from src/sc_datausage.h
rename to src/settings/sc_datausage.h
index 1ccf7f5..a55116a 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __SC_DATEUSAGE_H_
 #define __SC_DATEUSAGE_H_
 
-#include "GenSettingMenu.h"
+#include <GenSettingMenu.h>
 
 void precreate_du(GenSettingMenu *menu);
 
similarity index 91%
rename from src/sc_datetime.cpp
rename to src/settings/sc_datetime.cpp
index abb230c..18b11a5 100644 (file)
@@ -1,5 +1,5 @@
 #include "sc_datetime.h"
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -18,13 +18,13 @@ static MENURUN_ERROR menufunc_dt_au(int argc, char *argv[], GenSettingMenu *menu
        int ret = vconf_get_bool(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, &auto_update);
        if (ret != 0) {
                eprintf("\tFail to get Auto update!\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        printf("\tAuto update : ");
        printf("%s\n", auto_update? "On" : "Off");
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 
similarity index 81%
rename from src/sc_datetime.h
rename to src/settings/sc_datetime.h
index b6378f8..c994622 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __SC_DATETIME_H_
 #define __SC_DATETIME_H_
 
-#include "GenSettingMenu.h"
+#include <GenSettingMenu.h>
 
 void precreate_dt(GenSettingMenu *menu);
 
similarity index 89%
rename from src/sc_display.cpp
rename to src/settings/sc_display.cpp
index 3843737..448e25c 100644 (file)
@@ -1,5 +1,5 @@
 #include "sc_display.h"
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -16,11 +16,11 @@ static MENURUN_ERROR menufunc_di_ab(int argc, char *argv[], GenSettingMenu *menu
        int ret = vconf_get_int(VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_INT, &auto_bright);
     if( ret != 0 ) {
         eprintf("\tAuto Bright get fail!\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
     }
 
        printf("\tAuto Bright : %s\n", auto_bright? "On" : "Off");
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_di_br(int argc, char *argv[], GenSettingMenu *menu)
@@ -32,11 +32,11 @@ static MENURUN_ERROR menufunc_di_br(int argc, char *argv[], GenSettingMenu *menu
        int ret = vconf_get_int(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, &brightness);
     if(ret != 0) {
         eprintf("\tbrightness get fail!\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
     }
 
        printf("\tBrightness : %d\n", brightness);
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_di_fs(int argc, char *argv[], GenSettingMenu *menu)
@@ -46,11 +46,11 @@ static MENURUN_ERROR menufunc_di_fs(int argc, char *argv[], GenSettingMenu *menu
     int ret = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_FONT_SIZE, &fontsize);
     if( ret != 0) {
         eprintf("\tFont get fail!\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
     }
 
        printf("\tFont Size: %d\n", fontsize );
-    return MEMUFUNC_ERR_NONE;
+    return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_di_to(int argc, char *argv[], GenSettingMenu *menu)
@@ -61,7 +61,7 @@ static MENURUN_ERROR menufunc_di_to(int argc, char *argv[], GenSettingMenu *menu
        printf("\tScreen timeout : ");
        printf("%d\n", timeout);
 
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 MenuItem di_menulist[] ={
similarity index 81%
rename from src/sc_display.h
rename to src/settings/sc_display.h
index 73a8a3a..1db9c46 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __SC_DISPLAY_H_
 #define __SC_DISPLAY_H_
 
-#include "GenSettingMenu.h"
+#include <GenSettingMenu.h>
 
 void precreate_di(GenSettingMenu *menu);
 
similarity index 91%
rename from src/sc_sound.cpp
rename to src/settings/sc_sound.cpp
index 0ab8cf7..c95c344 100644 (file)
@@ -1,5 +1,5 @@
 #include "sc_sound.h"
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -74,18 +74,18 @@ static MENURUN_ERROR menufunc_so_rvol(int argc, char *argv[], GenSettingMenu *me
        sound_stream_info_t sound_stream_info;
        if (!_sound_manager_init(&sound_stream_info)) {
                eprintf("_sound_manager_init() failed!");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
        int vol = 0;
        if (sound_manager_get_volume(SOUND_TYPE_RINGTONE, &vol) != SOUND_MANAGER_ERROR_NONE) {
                _sound_manager_deinit(&sound_stream_info);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
        _sound_manager_deinit(&sound_stream_info);
 
        printf("\tRingtone Volume : ");
        printf("%d\n", vol);
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_so_nvol(int argc, char *argv[], GenSettingMenu *menu)
@@ -93,18 +93,18 @@ static MENURUN_ERROR menufunc_so_nvol(int argc, char *argv[], GenSettingMenu *me
        sound_stream_info_t sound_stream_info;
        if (!_sound_manager_init(&sound_stream_info)) {
                eprintf("_sound_manager_init() failed!");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
        int vol = 0;
        if (sound_manager_get_volume(SOUND_TYPE_NOTIFICATION, &vol) != SOUND_MANAGER_ERROR_NONE) {
                _sound_manager_deinit(&sound_stream_info);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
        _sound_manager_deinit(&sound_stream_info);
 
        printf("\tNotification Volume : ");
        printf("%d\n", vol);
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_so_mvol(int argc, char *argv[], GenSettingMenu *menu)
@@ -112,18 +112,18 @@ static MENURUN_ERROR menufunc_so_mvol(int argc, char *argv[], GenSettingMenu *me
        sound_stream_info_t sound_stream_info;
        if (!_sound_manager_init(&sound_stream_info)) {
                eprintf("_sound_manager_init() failed!");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
        int vol = 0;
        if (sound_manager_get_volume(SOUND_TYPE_MEDIA, &vol) != SOUND_MANAGER_ERROR_NONE) {
                _sound_manager_deinit(&sound_stream_info);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
        _sound_manager_deinit(&sound_stream_info);
 
        printf("\tMedia Volume : ");
        printf("%d\n", vol);
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_so_svol(int argc, char *argv[], GenSettingMenu *menu)
@@ -131,19 +131,19 @@ static MENURUN_ERROR menufunc_so_svol(int argc, char *argv[], GenSettingMenu *me
        sound_stream_info_t sound_stream_info;
        if (!_sound_manager_init(&sound_stream_info)) {
                eprintf("_sound_manager_init() failed!");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        int vol = 0;
        if (sound_manager_get_volume(SOUND_TYPE_SYSTEM, &vol) != SOUND_MANAGER_ERROR_NONE) {
                _sound_manager_deinit(&sound_stream_info);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
        _sound_manager_deinit(&sound_stream_info);
 
        printf("\tSystem Volume : ");
        printf("%d\n", vol);
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 
similarity index 80%
rename from src/sc_sound.h
rename to src/settings/sc_sound.h
index dd3d5ce..0d662df 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __SC_SOUND_H_
 #define __SC_SOUND_H_
 
-#include "GenSettingMenu.h"
+#include <GenSettingMenu.h>
 
 void precreate_so(GenSettingMenu *menu);
 
similarity index 94%
rename from src/sc_storage.cpp
rename to src/settings/sc_storage.cpp
index 23f876d..56a334d 100644 (file)
@@ -1,5 +1,5 @@
 #include "sc_wifi.h"
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -307,15 +307,15 @@ static inline int storage_USB_format()
        ret = scanf("%s", buf);
 
        if (buf[0] != 'Y' && buf[0] != 'y')
-               return MEMUFUNC_ERR_NONE;
+               return MENURUN_ERR_NONE;
 
        ret = format_usb_storage(usb_otg_path);
        if (ret < 0) {
                eprintf("format_usb_storage(%s) Fail(%d)\n",
                                usb_otg_path, ret);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 
@@ -378,7 +378,7 @@ static void storage_USB_cb(char *type, char *path, int mount, void *data)
                usb_otg_status = SETTING_STORAGE_USB_OTG_UNMOUNT;
                if (STORAGE_USB_REQ_UNMOUNT_BEFORE_FORMAT == usb_request) {
                        ret = storage_USB_format();
-                       if (MEMUFUNC_ERR_NONE == ret) {
+                       if (MENURUN_ERR_NONE == ret) {
                                usb_request = STORAGE_USB_REQ_FORMAT;
                        } else {
                                usb_request = STORAGE_USB_REQ_NONE;
@@ -475,7 +475,7 @@ static MENURUN_ERROR menufunc_st_me(int argc, char *argv[], GenSettingMenu *menu
        int media_ret = media_content_connect();
        if (MEDIA_CONTENT_ERROR_NONE != media_ret) {
                eprintf("media_content_connect() Fail(0x%x)\n Please execute this app with \"owner\" user\n", (-1)*media_ret);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
        __get_storage_capacity(buf, SETTING_CMD_MAX_STR_LEN);
 
@@ -483,7 +483,7 @@ static MENURUN_ERROR menufunc_st_me(int argc, char *argv[], GenSettingMenu *menu
        printf("%s", buf);
 
        media_content_disconnect();
-    return MEMUFUNC_ERR_NONE;
+    return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_st_sd(int argc, char *argv[], GenSettingMenu *menu){
@@ -497,12 +497,12 @@ static MENURUN_ERROR menufunc_st_sd(int argc, char *argv[], GenSettingMenu *menu
        int ret = vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &sd_status);
        if (ret != 0) {
                eprintf("vconf_get_int(%s) fail!\n", VCONFKEY_SYSMAN_MMC_STATUS);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        if (sd_status != VCONFKEY_SYSMAN_MMC_MOUNTED){
                        eprintf("SD card NOT mounted!\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        char *MMC_path = _TZ_SYS_MEDIA"/sdcard";
@@ -517,7 +517,7 @@ static MENURUN_ERROR menufunc_st_sd(int argc, char *argv[], GenSettingMenu *menu
        printf("avail : %s\n", avail_str);
 
 
-    return MEMUFUNC_ERR_NONE;
+    return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_st_ms(int argc, char *argv[], GenSettingMenu *menu)
@@ -528,22 +528,22 @@ static MENURUN_ERROR menufunc_st_ms(int argc, char *argv[], GenSettingMenu *menu
        int ret = vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &sd_status);
        if (ret != 0) {
                eprintf("vconf_get_int(%s) fail!\n", VCONFKEY_SYSMAN_MMC_STATUS);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        if (sd_status == VCONFKEY_SYSMAN_MMC_MOUNTED){
                eprintf("SD card already mounted!\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        ret = storage_request_mount_mmc(&mmc_content);
        if (ret == -1) {
                eprintf("storage_request_mount_mmc() Fail\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        printf("SD card mount\n");
-    return MEMUFUNC_ERR_NONE;
+    return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_st_mss(int argc, char *argv[], GenSettingMenu *menu)
@@ -553,7 +553,7 @@ static MENURUN_ERROR menufunc_st_mss(int argc, char *argv[], GenSettingMenu *men
        int ret = vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &sd_status);
        if (ret != 0) {
                eprintf("vconf_get_int(%s) fail!\n", VCONFKEY_SYSMAN_MMC_STATUS);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        if (sd_status == VCONFKEY_SYSMAN_MMC_MOUNTED ||
@@ -563,7 +563,7 @@ static MENURUN_ERROR menufunc_st_mss(int argc, char *argv[], GenSettingMenu *men
                printf("SD card NOT mounted!\n");
        }
 
-    return MEMUFUNC_ERR_NONE;
+    return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_st_us(int argc, char *argv[], GenSettingMenu *menu){
@@ -573,22 +573,22 @@ static MENURUN_ERROR menufunc_st_us(int argc, char *argv[], GenSettingMenu *menu
        int ret = vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &sd_status);
        if (ret != 0) {
                eprintf("vconf_get_int(%s) fail!\n", VCONFKEY_SYSMAN_MMC_STATUS);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        if (sd_status != VCONFKEY_SYSMAN_MMC_MOUNTED){
                        eprintf("SD card NOT mounted!\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        ret = storage_request_unmount_mmc(&mmc_content, MNT_FORCE);
        if (ret == -1) {
                eprintf("storage_request_unmount_mmc() Fail\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        printf("SD card Unmount\n");
-    return MEMUFUNC_ERR_NONE;
+    return MENURUN_ERR_NONE;
 }
 
 
@@ -598,11 +598,11 @@ static MENURUN_ERROR menufunc_st_fs(int argc, char *argv[], GenSettingMenu *menu
        int ret = storage_request_format_mmc(&mmc_content);
        if (ret == -1) {
                eprintf("failed to call storage_request_format_mmc\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        printf("sd card format complete\n");
-    return MEMUFUNC_ERR_NONE;
+    return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_st_ids(int argc, char *argv[], GenSettingMenu *menu)
@@ -612,16 +612,16 @@ static MENURUN_ERROR menufunc_st_ids(int argc, char *argv[], GenSettingMenu *men
        int ret = vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_WIFI_DIRECT_INT, val);
        if (ret != 0) {
                eprintf("vconf_get_int(%s) fail!\n", VCONFKEY_SETAPPL_DEFAULT_MEM_WIFI_DIRECT_INT);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        ret = vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_BLUETOOTH_INT, val);
        if (ret != 0) {
                eprintf("vconf_get_int(%s) fail!\n", VCONFKEY_SETAPPL_DEFAULT_MEM_BLUETOOTH_INT);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
        printf("Set internal memory for default storage shared content\n");
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_st_sds(int argc, char *argv[], GenSettingMenu *menu)
@@ -631,16 +631,16 @@ static MENURUN_ERROR menufunc_st_sds(int argc, char *argv[], GenSettingMenu *men
        int ret = vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_WIFI_DIRECT_INT, val);
        if (ret != 0) {
                eprintf("vconf_get_int(%s) fail!\n", VCONFKEY_SETAPPL_DEFAULT_MEM_WIFI_DIRECT_INT);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        ret = vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_BLUETOOTH_INT, val);
        if (ret != 0) {
                eprintf("vconf_get_int(%s) fail!\n", VCONFKEY_SETAPPL_DEFAULT_MEM_BLUETOOTH_INT);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
        printf("Set SD card for default storage shared content\n");
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_st_ida(int argc, char *argv[], GenSettingMenu *menu)
@@ -650,11 +650,11 @@ static MENURUN_ERROR menufunc_st_ida(int argc, char *argv[], GenSettingMenu *men
        int ret = vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_INSTALL_APPLICATIONS_INT, val);
        if (ret != 0) {
                eprintf("vconf_get_int(%s) fail!\n", VCONFKEY_SETAPPL_DEFAULT_MEM_INSTALL_APPLICATIONS_INT);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        printf("Set internal memory for default storage app installation\n");
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_st_sda(int argc, char *argv[], GenSettingMenu *menu)
@@ -664,11 +664,11 @@ static MENURUN_ERROR menufunc_st_sda(int argc, char *argv[], GenSettingMenu *men
        int ret = vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_INSTALL_APPLICATIONS_INT, val);
        if (ret != 0) {
                eprintf("vconf_get_int(%s) fail!\n", VCONFKEY_SETAPPL_DEFAULT_MEM_INSTALL_APPLICATIONS_INT);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        printf("Set SD card for default storage app installation\n");
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_st_da(int argc, char *argv[], GenSettingMenu *menu)
@@ -678,11 +678,11 @@ static MENURUN_ERROR menufunc_st_da(int argc, char *argv[], GenSettingMenu *menu
        int ret = vconf_get_int(VCONFKEY_SETAPPL_DEFAULT_MEM_INSTALL_APPLICATIONS_INT, &val);
        if (ret != 0) {
                eprintf("vconf_get_int(%s) fail!\n", VCONFKEY_SETAPPL_DEFAULT_MEM_INSTALL_APPLICATIONS_INT);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        printf("Default storage app installation : %s\n", (val)?"Internal memory":"SD Card");
-    return MEMUFUNC_ERR_NONE;
+    return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_st_ds(int argc, char *argv[], GenSettingMenu *menu)
@@ -692,7 +692,7 @@ static MENURUN_ERROR menufunc_st_ds(int argc, char *argv[], GenSettingMenu *menu
        int ret = vconf_get_int(VCONFKEY_SETAPPL_DEFAULT_MEM_WIFI_DIRECT_INT, &val);
        if (ret != 0) {
                eprintf("vconf_get_int(%s) fail!\n", VCONFKEY_SETAPPL_DEFAULT_MEM_WIFI_DIRECT_INT);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        printf("Default storage shared content with wifi : %s\n", (val)?"Internal memory":"SD Card");
@@ -700,11 +700,11 @@ static MENURUN_ERROR menufunc_st_ds(int argc, char *argv[], GenSettingMenu *menu
        ret = vconf_get_int(VCONFKEY_SETAPPL_DEFAULT_MEM_BLUETOOTH_INT, &val);
        if (ret != 0) {
                eprintf("vconf_get_int(%s) fail!\n", VCONFKEY_SETAPPL_DEFAULT_MEM_BLUETOOTH_INT);
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        printf("Default storage shared content with bluetooth : %s\n", (val)?"Internal memory":"SD Card");
-    return MEMUFUNC_ERR_NONE;
+    return MENURUN_ERR_NONE;
 }
 
 MenuItem st_menulist[] ={
similarity index 81%
rename from src/sc_storage.h
rename to src/settings/sc_storage.h
index 2348f8d..ef74034 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __SC_STORAGE_H_
 #define __SC_STORAGE_H_
 
-#include "GenSettingMenu.h"
+#include <GenSettingMenu.h>
 
 void precreate_st(GenSettingMenu *menu);
 
similarity index 82%
rename from src/sc_wifi.cpp
rename to src/settings/sc_wifi.cpp
index fe85b5f..894a95d 100644 (file)
@@ -1,5 +1,5 @@
 #include "sc_wifi.h"
-#include <settingcmd-debug.h>
+#include <sc-debug.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -12,26 +12,26 @@ static MENURUN_ERROR menufunc_wf_st(int argc, char *argv[], GenSettingMenu *menu
 {
        int state = 0;
        int ret = vconf_get_int(VCONFKEY_WIFI_STATE, &state);
-       if (ret != MEMUFUNC_ERR_NONE) {
+       if (ret != MENURUN_ERR_NONE) {
                eprintf("\twifi state get fail!\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        printf("\tState : %s\n", state ? "On" : "Off");
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 static MENURUN_ERROR menufunc_wf_nf(int argc, char *argv[], GenSettingMenu *menu)
 {
        bool state = false;
        int ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION, &state);
-       if (ret != MEMUFUNC_ERR_NONE) {
+       if (ret != MENURUN_ERR_NONE) {
                eprintf("\twifi notification get fail!\n");
-               return MEMUFUNC_ERR_NORMAL;
+               return MENURUN_ERR_NORMAL;
        }
 
        printf("\tNodification : %s\n", state ? "On" : "Off");
-       return MEMUFUNC_ERR_NONE;
+       return MENURUN_ERR_NONE;
 }
 
 MenuItem wf_menulist[] = {
similarity index 80%
rename from src/sc_wifi.h
rename to src/settings/sc_wifi.h
index e36d087..c2790eb 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __SC_WIFI_H_
 #define __SC_WIFI_H_
 
-#include "GenSettingMenu.h"
+#include <GenSettingMenu.h>
 
 void precreate_wf(GenSettingMenu *menu);