Fixed the build error using gcc 13
[platform/core/system/libstorage.git] / include / common.h
index 1a9d987..5c5a8ac 100644 (file)
@@ -24,6 +24,7 @@ extern "C" {
 #endif
 
 #include "storage-expand.h"
+#include <sys/statvfs.h>
 
 #ifndef API
 #define API __attribute__ ((visibility("default")))
@@ -42,13 +43,16 @@ extern "C" {
 #endif
 
 enum storage_cb_type {
-       STORAGE_CALLBACK_STATE,
+       STORAGE_CALLBACK_ID,
+       STORAGE_CALLBACK_TYPE,
        STORAGE_CALLBACK_MAX,
 };
 
 struct storage_cb_info {
        int id;
+       storage_type_e type;
        storage_state_changed_cb state_cb;
+       storage_changed_cb type_cb;
        void *user_data;
 };
 
@@ -59,6 +63,7 @@ struct storage_ops {
        int (*get_space) (unsigned long long *total, unsigned long long *available);
        int (*register_cb) (enum storage_cb_type type, struct storage_cb_info *info);
        int (*unregister_cb) (enum storage_cb_type type, struct storage_cb_info *info);
+       int storage_id;
 };
 
 #define STORAGE_OPS_REGISTER(st)       \
@@ -74,6 +79,16 @@ static void __DESTRUCTOR__ module_exit(void) \
 void add_device(const struct storage_ops *st);
 void remove_device(const struct storage_ops *st);
 
+int storage_get_external_memory_size_with_path(char *path, struct statvfs *buf);
+int storage_get_external_memory_size64_with_path(char *path, struct statvfs *buf);
+
+#define COMPAT_DIR "/opt/usr/media"
+int is_compat_bind_mount(void);
+int storage_ext_is_supported(void);
+int mount_check(const char *path);
+
+#define USER_UID_START         5000
+
 #ifdef __cplusplus
 }
 #endif