Tizen 2.0 Release
[apps/core/preloaded/myfiles.git] / src / include / mf-fm-svc-wrapper.h
1 /*
2  * Copyright 2013         Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *  http://floralicense.org/license/
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18
19
20 #ifndef __DEF_MYFILE_FILEMANAGERSERVICE_WRAPPER_H_
21 #define __DEF_MYFILE_FILEMANAGERSERVICE_WRAPPER_H_
22
23 #include <stdio.h>
24 #include <glib.h>
25 #include "mf-main.h"
26 #include "mf-conf.h"
27
28 #include <drm_client.h>
29 #include <drm_client_types.h>
30
31 #define MF_TRANSLATE_LENGTH     40
32 #define MF_TRANSLATE_OMIT_PART  "/.../"
33 #define MF_PATH_INFO_MAX_LENGTH_PORTRAIT        35
34 #define MF_PATH_INFO_MAX_LENGTH_LANDSCAPE       55
35
36 typedef enum _TRANS_OPTION      MF_TRANS_OPTION;
37
38 enum _TRANS_OPTION {
39         MF_TRANS_OPTION_NONE = 0,
40         MF_TRANS_OPTION_POPUP,
41         MF_TRANS_OPTION_LABEL,
42         MF_TRANS_OPTION_MAX,
43 } ;
44
45 /* basis file managing. create/rename/move/copy/rename */
46 int mf_fm_svc_wrapper_create_service(void *data, GString *fullpath);
47 int mf_fm_svc_wrapper_rename_service(void *data, GString *from_fullpath, GString *to_name);
48
49
50 int mf_fm_svc_wrapper_get_file_list(const char *folder_name, Eina_List **dir_list, Eina_List **file_list);
51 int mf_fm_svc_wrapper_classify_dir_list(Eina_List *dir_list, Eina_List **default_dir_list, Eina_List **user_dir_list);
52
53 char *mf_fm_svc_wrapper_get_root_path_by_tab_label(const char *label);
54 /* file information get/set */
55 GString *mf_fm_svc_wrapper_get_file_name(GString *path);
56 int mf_fm_svc_wrapper_get_location(const char *fullpath);
57 unsigned long mf_fm_svc_wrapper_get_free_space(int state);
58 gint mf_fm_svc_wrapper_get_folder_foldersystem(GString *path, bool *result);
59 int file_createdate_get(GString *path);
60 gboolean mf_fm_svc_wrapper_is_dir(GString *path);
61 int file_filesize_get(GString *path);
62 int file_index_get(GString *path);
63 int file_location_get(GString *path);
64 bool mf_fm_svc_wrapper_detect_duplication(GString *to);
65 GString *mf_fm_svc_wrapper_get_file_parent_path(GString *fullpath);
66 int mf_fm_svc_wrapper_file_auto_rename(void *data, GString *fullpath, int file_name_type, GString **filename);
67 int file_MMC_status();
68 int mf_fm_svc_wrapper_detect_recursion(GString *from, GString *to);
69 bool is_file_existing(const char *file_full_path);
70 int mf_fm_svc_wrapper_is_root_path(const char *fullpath);
71
72 bool get_phone_status(int *value);
73 int drm_launch(void *data, const char *path);
74 char *mf_fm_svc_wrapper_translate_path(const char *original_path, MF_TRANS_OPTION option);
75 gboolean mf_fm_svc_is_mass_storage_on();
76 char *mf_fm_svc_path_info_get(const char *original_path);
77 char *mf_fm_svc_path_info_translate(char *path_info, int path_info_max_len);
78 char *mf_fm_svc_get_file_name(GString *path);
79
80 #endif