#define BATCH_END "COMMIT"
#define PATH_PLUGIN_LIBICU PATH_LIBDIR"/libicui18n.so"
-UCollator *(*icu_ucol_open)(const char *, UErrorCode *);
-void (*icu_ucol_close)(UCollator *);
-void (*icu_ucol_setStrength)(UCollator *, UCollationStrength);
-UCollationResult (*icu_ucol_strcollIter)(const UCollator *, UCharIterator *, UCharIterator *, UErrorCode *);
-void (*icu_uiter_setUTF8)(UCharIterator *, const char *, int32_t);
-void (*icu_uloc_setDefault)(const char* localeID, UErrorCode* status);
-const char* (*icu_uloc_getDefault)(void);
+static UCollator *(*icu_ucol_open)(const char *, UErrorCode *);
+static void (*icu_ucol_close)(UCollator *);
+static void (*icu_ucol_setStrength)(UCollator *, UCollationStrength);
+static UCollationResult (*icu_ucol_strcollIter)(const UCollator *, UCharIterator *, UCharIterator *, UErrorCode *);
+static void (*icu_uiter_setUTF8)(UCharIterator *, const char *, int32_t);
+static void (*icu_uloc_setDefault)(const char* localeID, UErrorCode* status);
+static const char* (*icu_uloc_getDefault)(void);
static void *funcHandle = NULL;
#include "media-util.h"
#include "private.h"
-GArray *handle_list_internal;
+static GArray *handle_list_internal;
static GMutex mutex_internal;
#define MS_MEDIA_DBUS_NAME_INTERNAL "ms_db_updated_internal"
char *req_path;
} media_scan_data;
-GArray *req_list;
+static GArray *req_list;
static int _check_dir_path(const char *dir_path, uid_t uid)
{
void *usr_data;
} block_cb_data;
-block_cb_data *g_stg_cb_data = NULL;
+static block_cb_data *g_stg_cb_data = NULL;
static void __ms_block_changed(GDBusConnection* connection,
const gchar* sender_name,
static GDBusConnection *g_pwr_bus;
static int g_pwr_handler;
-pwoff_cb_data *g_pwr_cb_data = NULL;
+static pwoff_cb_data *g_pwr_cb_data = NULL;
static void __poweroff_signal_cb(GDBusConnection *connection,
const gchar *sender_name,
#define PATH_PLUGIN_LIB PATH_LIBDIR"/libmedia-content-plugin.so"
-GMainLoop * mainloop = NULL;
-struct timeval start_time, end_time;
+static GMainLoop * mainloop = NULL;
+static struct timeval start_time;
-int (*svc_check_db) (sqlite3 * handle, uid_t uid);
-int (*svc_get_storage_id) (sqlite3 * handle, const char *path, char *storage_id, uid_t uid);
+static int (*svc_check_db) (sqlite3 * handle, uid_t uid);
+static int (*svc_get_storage_id) (sqlite3 * handle, const char *path, char *storage_id, uid_t uid);
-void callback(media_request_result_s * result, void *user_data)
+static void callback(media_request_result_s * result, void *user_data)
{
long long ms_time = 0;
+ struct timeval end_time;
if (result->result != MEDIA_REQUEST_SCAN_PARTIAL) {
gettimeofday(&end_time, NULL);
#include "media-scanner-common-v2.h"
bool power_off2;
-bool disc_stg_scan_status;
-bool disc_dir_scan_status;
+static bool disc_stg_scan_status;
+static bool disc_dir_scan_status;
void msc_set_power_status(bool status)
{
extern bool power_off2;
GAsyncQueue *storage_extract_queue;
GAsyncQueue *folder_extract_queue;
-GMutex extract_req_mutex;
-GMutex extract_blocked_mutex;
-char *g_extract_cancel_path;
-char *g_extract_blocked_path;
+static GMutex extract_req_mutex;
+static GMutex extract_blocked_mutex;
+static char *g_extract_cancel_path;
+static char *g_extract_blocked_path;
bool g_directory_extract_processing;
-int stg_extract_status;
+static int stg_extract_status;
-GMutex extract_item_mutex;
-GMutex decode_mutex;
+static GMutex extract_item_mutex;
+static GMutex decode_mutex;
-s_extract_item* cancel_extract_item = NULL;
-s_extract_item* cur_extract_item = NULL;
+static s_extract_item* cancel_extract_item = NULL;
+static s_extract_item* cur_extract_item = NULL;
-GCond extract_data_cond;
-GMutex extract_data_mutex;
+static GCond extract_data_cond;
+static GMutex extract_data_mutex;
#define VCONFKEY_PRIVATE_EXTRACTSTATUS "db/private/extractstatus"
#define LAST_EVENT 1
#define NORMAL_EVENT 0
GAsyncQueue *scan_queue2;
GAsyncQueue *reg_queue2;
GMutex scan_req_mutex2;
-GMutex blocked_mutex2;
-GMutex storage_scan_mutex2;
-GMutex dir_scan_mutex2;
-GCond data_cond2; /* Must be initialized somewhere */
-GMutex data_mutex2; /* Must be initialized somewhere */
-gpointer current_data2 = NULL;
-GMutex scan_item_mutex;
+static GMutex blocked_mutex2;
+static GMutex storage_scan_mutex2;
+static GMutex dir_scan_mutex2;
+static GCond data_cond2; /* Must be initialized somewhere */
+static GMutex data_mutex2; /* Must be initialized somewhere */
+static GMutex scan_item_mutex;
-char *g_blocked_path2;
+static char *g_blocked_path2;
-s_scan_item* cancel_scan_item = NULL;
-s_scan_item* cur_scan_item = NULL;
+static s_scan_item* cancel_scan_item = NULL;
+static s_scan_item* cur_scan_item = NULL;
int g_directory_scan_processing2 = DIR_SCAN_NON_SCAN;
-char *g_storage_scan_path;
-char* g_dir_scan_path;
-unsigned int io_err_folder;
-unsigned int io_err_storage;
+static char *g_storage_scan_path;
+static char* g_dir_scan_path;
+static unsigned int io_err_folder;
+static unsigned int io_err_storage;
typedef int (*DIR_SCAN_CB)();
-DIR_SCAN_CB g_dir_scan_cb;
+static DIR_SCAN_CB g_dir_scan_cb;
struct linux_dirent {
ino64_t d_ino; /* 64-bit inode number */
#include "media-scanner-scan.h"
bool power_off;
-GAsyncQueue * storage_queue;
+static GAsyncQueue * storage_queue;
GAsyncQueue *scan_queue;
-GAsyncQueue *reg_queue;
+static GAsyncQueue *reg_queue;
GMutex scan_req_mutex;
static bool __msc_is_stop_needed(void)
static bool scanner_cleaned;
-int fifo_fd;
+static int fifo_fd;
static int __ms_get_remained_task(void)
{