From cb877e00d9e037e9a4a58084ee635ac8d2aae616 Mon Sep 17 00:00:00 2001 From: feiniks <36756310+feiniks@users.noreply.github.com> Date: Wed, 18 Nov 2020 16:55:44 +0800 Subject: [PATCH] portable visual studio 2019 (#2378) * portable visual studio 2019 * Need alignment and fix compile warning * Define related headers in common.h * del reference config.h * Add files generated by vala * Def reference config.h for windows * Support vs build Co-authored-by: sun <1184550842@qq.com> --- .gitignore | 12 +- common/block-backend-fs.c | 5 +- common/block-mgr.c | 6 +- common/cdc/cdc.c | 2 + common/common.h | 31 +- common/fs-mgr.c | 32 + common/index/index.h | 80 +- common/log.h | 8 + common/obj-backend-fs.c | 2 +- common/obj-store.c | 2 +- common/rpc-service.c | 2 + daemon/http-tx-mgr.c | 10 + daemon/repo-mgr.c | 4 +- daemon/seaf-daemon.c | 11 +- daemon/seafile-session.c | 2 + daemon/set-perm.c | 2 +- daemon/timer.c | 2 + daemon/wt-monitor-win32.c | 8 +- lib/db.c | 2 + lib/include.h | 4 +- lib/net.c | 2 + lib/repo.c | 2827 +++++++++++++++++++++ lib/seafile-object.h | 424 +++ lib/seafile-rpc-wrapper.c | 4 + lib/task.c | 773 ++++++ lib/utils.c | 32 +- lib/utils.h | 20 +- msi/custom/seafile_custom.sln | 31 + msi/custom/seafile_custom.vcxproj | 162 ++ msi/custom/seafile_custom.vcxproj.filters | 22 + msi/seafile.wxs | 10 +- scripts/build/build-msi-vs.py | 499 ++++ seafile.sln | 31 + seafile.vcxproj | 276 ++ 34 files changed, 5282 insertions(+), 58 deletions(-) create mode 100644 lib/repo.c create mode 100644 lib/seafile-object.h create mode 100644 lib/task.c create mode 100644 msi/custom/seafile_custom.sln create mode 100644 msi/custom/seafile_custom.vcxproj create mode 100644 msi/custom/seafile_custom.vcxproj.filters create mode 100644 scripts/build/build-msi-vs.py create mode 100644 seafile.sln create mode 100644 seafile.vcxproj diff --git a/.gitignore b/.gitignore index 6880fb51..d01a68f6 100644 --- a/.gitignore +++ b/.gitignore @@ -61,13 +61,10 @@ debian/*.substvars lib/*.tmp lib/dir.c lib/dirent.c -lib/seafile-object.h -lib/task.c lib/webaccess.c lib/branch.c lib/commit.c lib/crypt.c -lib/repo.c lib/copy-task.c app/seafile app/seafserv-tool @@ -125,3 +122,12 @@ server/gc/seaf-migrate /test-driver *.dmp /symbols + +# visual studio +Debug +msi/custom/x64 +msi/ext.wxi +msi/shell.wxs +seafile.vcxproj.user +x64 +msi/custom/seafile_custom.vcxproj.user diff --git a/common/block-backend-fs.c b/common/block-backend-fs.c index 29e2e06d..868d8d67 100644 --- a/common/block-backend-fs.c +++ b/common/block-backend-fs.c @@ -12,7 +12,9 @@ #include #include +#ifndef WIN32 #include +#endif #include "block-backend.h" #include "obj-store.h" @@ -190,6 +192,7 @@ block_backend_fs_block_exists (BlockBackend *bend, char block_path[SEAF_PATH_MAX]; get_block_path (bend, block_sha1, block_path, store_id, version); + if (g_access (block_path, F_OK) == 0) return TRUE; else @@ -336,7 +339,7 @@ block_backend_fs_copy (BlockBackend *bend, } #ifdef WIN32 - if (!CreateHardLink (dst_path, src_path, NULL)) { + if (!CreateHardLinkA (dst_path, src_path, NULL)) { seaf_warning ("Failed to link %s to %s: %lu.\n", src_path, dst_path, GetLastError()); return -1; diff --git a/common/block-mgr.c b/common/block-mgr.c index 894ada23..9ab65985 100644 --- a/common/block-mgr.c +++ b/common/block-mgr.c @@ -9,11 +9,13 @@ #include #include +#ifndef WIN32 #include +#include +#endif #include #include #include -#include #include #include "block-backend.h" @@ -98,7 +100,7 @@ void seaf_block_manager_block_handle_free (SeafBlockManager *mgr, BlockHandle *handle) { - return mgr->backend->block_handle_free (mgr->backend, handle); + mgr->backend->block_handle_free (mgr->backend, handle); } int diff --git a/common/cdc/cdc.c b/common/cdc/cdc.c index ceb27be3..959b38d9 100644 --- a/common/cdc/cdc.c +++ b/common/cdc/cdc.c @@ -4,7 +4,9 @@ #include "log.h" +#ifndef WIN32 #include +#endif #include #include #include diff --git a/common/common.h b/common/common.h index 63505eed..55925077 100644 --- a/common/common.h +++ b/common/common.h @@ -7,7 +7,10 @@ #include #endif +#ifndef WIN32 #include +#include +#endif #include #include /* uint32_t */ #include /* size_t */ @@ -15,11 +18,25 @@ #include #include #include -#include #include #include +#ifdef WIN32 +#define strcasecmp _stricmp +#define strncasecmp _strnicmp + +#if !defined S_ISDIR +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif + +#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG) +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif + +#define F_OK 0 +#endif + #define EMPTY_SHA1 "0000000000000000000000000000000000000000" #define CURRENT_ENC_VERSION 3 @@ -39,16 +56,4 @@ #define SEAF_PATH_MAX 4096 -#ifndef ccnet_warning -#define ccnet_warning(fmt, ...) g_warning("%s(%d): " fmt, __FILE__, __LINE__, ##__VA_ARGS__) -#endif - -#ifndef ccnet_error -#define ccnet_error(fmt, ...) g_error("%s(%d): " fmt, __FILE__, __LINE__, ##__VA_ARGS__) -#endif - -#ifndef ccnet_message -#define ccnet_message(fmt, ...) g_message("%s(%d): " fmt, __FILE__, __LINE__, ##__VA_ARGS__) -#endif - #endif diff --git a/common/fs-mgr.c b/common/fs-mgr.c index 84579c5b..e49331ee 100644 --- a/common/fs-mgr.c +++ b/common/fs-mgr.c @@ -4,7 +4,9 @@ #include #include +#ifndef WIN32 #include +#endif #ifndef WIN32 #include @@ -33,23 +35,53 @@ struct _SeafFSManagerPriv { GHashTable *bl_cache; }; +#ifdef WIN32 +__pragma(pack(push, 1)) +typedef struct SeafileOndisk { + guint32 type; + guint64 file_size; + unsigned char block_ids[0]; +} SeafileOndisk; +__pragma(pack(pop)) +#else typedef struct SeafileOndisk { guint32 type; guint64 file_size; unsigned char block_ids[0]; } __attribute__((__packed__)) SeafileOndisk; +#endif +#ifdef WIN32 +__pragma(pack(push, 1)) +typedef struct DirentOndisk { + guint32 mode; + char id[40]; + guint32 name_len; + char name[0]; +} DirentOndisk; +__pragma(pack(pop)) +#else typedef struct DirentOndisk { guint32 mode; char id[40]; guint32 name_len; char name[0]; } __attribute__((__packed__)) DirentOndisk; +#endif +#ifdef WIN32 +__pragma(pack(push, 1)) +typedef struct SeafdirOndisk { + guint32 type; + char dirents[0]; +} SeafdirOndisk; +__pragma(pack(pop)) +#else typedef struct SeafdirOndisk { guint32 type; char dirents[0]; } __attribute__((__packed__)) SeafdirOndisk; +#endif #ifndef SEAFILE_SERVER uint32_t diff --git a/common/index/index.h b/common/index/index.h index 7c11e312..7e862178 100644 --- a/common/index/index.h +++ b/common/index/index.h @@ -3,7 +3,12 @@ #include "common.h" +#ifndef WIN32 #include +#include +#include +#include +#endif #include #include #include @@ -15,10 +20,7 @@ #ifndef __APPLE__ #include #endif -#include #include -#include -#include #include #include "utils.h" @@ -117,6 +119,8 @@ struct cache_time { * We save the fields in big-endian order to allow using the * index file over NFS transparently. */ +#ifdef WIN32 +__pragma(pack(push, 1)) struct ondisk_cache_entry { struct cache_time ctime; struct cache_time mtime; @@ -129,13 +133,31 @@ struct ondisk_cache_entry { unsigned char sha1[20]; unsigned short flags; char name[0]; /* more */ -} __attribute__ ((packed)); +}; +__pragma(pack(pop)) +#else +struct ondisk_cache_entry { + struct cache_time ctime; + struct cache_time mtime; + unsigned int dev; + unsigned int ino; + unsigned int mode; + unsigned int uid; + unsigned int gid; + uint64_t size; + unsigned char sha1[20]; + unsigned short flags; + char name[0]; /* more */ +} __attribute__((__packed__)); +#endif struct cache_time64 { guint64 sec; guint64 nsec; }; +#ifdef WIN32 +__pragma(pack(push, 1)) struct ondisk_cache_entry2 { struct cache_time64 ctime; struct cache_time64 mtime; @@ -148,13 +170,31 @@ struct ondisk_cache_entry2 { unsigned char sha1[20]; unsigned short flags; char name[0]; /* more */ -} __attribute__ ((packed)); +}; +__pragma(pack(pop)) +#else +struct ondisk_cache_entry2 { + struct cache_time64 ctime; + struct cache_time64 mtime; + unsigned int dev; + unsigned int ino; + unsigned int mode; + unsigned int uid; + unsigned int gid; + uint64_t size; + unsigned char sha1[20]; + unsigned short flags; + char name[0]; /* more */ +} __attribute__((__packed__)); +#endif /* * This struct is used when CE_EXTENDED bit is 1 * The struct must match ondisk_cache_entry exactly from * ctime till flags */ +#ifdef WIN32 +__pragma(pack(push, 1)) struct ondisk_cache_entry_extended { struct cache_time ctime; struct cache_time mtime; @@ -168,14 +208,40 @@ struct ondisk_cache_entry_extended { unsigned short flags; unsigned short flags2; char name[0]; /* more */ -} __attribute__ ((packed)); +}; +__pragma(pack(pop)) +#else +struct ondisk_cache_entry_extended { + struct cache_time ctime; + struct cache_time mtime; + unsigned int dev; + unsigned int ino; + unsigned int mode; + unsigned int uid; + unsigned int gid; + uint64_t size; + unsigned char sha1[20]; + unsigned short flags; + unsigned short flags2; + char name[0]; /* more */ +} __attribute__((__packed__)); +#endif #define CACHE_EXT_MODIFIER 1 +#ifdef WIN32 +__pragma(pack(push, 1)) struct cache_ext_hdr { unsigned int ext_name; unsigned int ext_size; -} __attribute__ ((packed)); +}; +__pragma(pack(pop)) +#else +struct cache_ext_hdr { + unsigned int ext_name; + unsigned int ext_size; +} __attribute__((__packed__)); +#endif struct cache_entry { struct cache_time64 ce_ctime; diff --git a/common/log.h b/common/log.h index 31e677d5..7fcea822 100644 --- a/common/log.h +++ b/common/log.h @@ -4,11 +4,19 @@ #define SEAFILE_DOMAIN g_quark_from_string("seafile") #ifndef seaf_warning +#ifndef WIN32 #define seaf_warning(fmt, ...) g_warning("%s(%d): " fmt, __FILE__, __LINE__, ##__VA_ARGS__) +#else +#define seaf_warning(...) g_warning(__VA_ARGS__) +#endif #endif #ifndef seaf_message +#ifndef WIN32 #define seaf_message(fmt, ...) g_message("%s(%d): " fmt, __FILE__, __LINE__, ##__VA_ARGS__) +#else +#define seaf_message(...) g_message(__VA_ARGS__) +#endif #endif diff --git a/common/obj-backend-fs.c b/common/obj-backend-fs.c index e0c56190..c0819018 100644 --- a/common/obj-backend-fs.c +++ b/common/obj-backend-fs.c @@ -438,7 +438,7 @@ obj_backend_fs_copy (ObjBackend *bend, } #ifdef WIN32 - if (!CreateHardLink (dst_path, src_path, NULL)) { + if (!CreateHardLinkA (dst_path, src_path, NULL)) { seaf_warning ("Failed to link %s to %s: %lu.\n", src_path, dst_path, GetLastError()); return -1; diff --git a/common/obj-store.c b/common/obj-store.c index f436e962..a0f7befb 100644 --- a/common/obj-store.c +++ b/common/obj-store.c @@ -105,7 +105,7 @@ seaf_obj_store_delete_obj (struct SeafObjStore *obj_store, !obj_id || !is_object_id_valid(obj_id)) return; - return bend->delete (bend, repo_id, version, obj_id); + bend->delete (bend, repo_id, version, obj_id); } int diff --git a/common/rpc-service.c b/common/rpc-service.c index 3cc3d381..6c0b20b4 100644 --- a/common/rpc-service.c +++ b/common/rpc-service.c @@ -5,7 +5,9 @@ #include #include +#ifndef WIN32 #include +#endif #include "utils.h" #include "seafile-session.h" diff --git a/daemon/http-tx-mgr.c b/daemon/http-tx-mgr.c index e1377237..629d9c9f 100644 --- a/daemon/http-tx-mgr.c +++ b/daemon/http-tx-mgr.c @@ -2979,11 +2979,21 @@ out: #define MAX_OBJECT_PACK_SIZE (1 << 20) /* 1MB */ +#ifdef WIN32 +__pragma(pack(push, 1)) +typedef struct { + char obj_id[40]; + guint32 obj_size; + guint8 object[0]; +} ObjectHeader; +__pragma(pack(pop)) +#else typedef struct { char obj_id[40]; guint32 obj_size; guint8 object[0]; } __attribute__((__packed__)) ObjectHeader; +#endif static int send_fs_objects (HttpTxTask *task, Connection *conn, GList **send_fs_list) diff --git a/daemon/repo-mgr.c b/daemon/repo-mgr.c index 006f67f0..6e676684 100644 --- a/daemon/repo-mgr.c +++ b/daemon/repo-mgr.c @@ -7176,7 +7176,7 @@ GList *seaf_repo_load_ignore_files (const char *worktree) SeafStat st; FILE *fp; char *full_path, *pattern; - char path[PATH_MAX]; + char path[SEAF_PATH_MAX]; full_path = g_build_path (PATH_SEPERATOR, worktree, IGNORE_FILE, NULL); @@ -7188,7 +7188,7 @@ GList *seaf_repo_load_ignore_files (const char *worktree) if (fp == NULL) goto error; - while (fgets(path, PATH_MAX, fp) != NULL) { + while (fgets(path, SEAF_PATH_MAX, fp) != NULL) { /* remove leading and trailing whitespace, including \n \r. */ g_strstrip (path); diff --git a/daemon/seaf-daemon.c b/daemon/seaf-daemon.c index deade126..e94ba413 100644 --- a/daemon/seaf-daemon.c +++ b/daemon/seaf-daemon.c @@ -5,9 +5,12 @@ #ifdef WIN32 #include #include +#include #endif +#ifndef WIN32 #include +#endif #include #include #include @@ -286,7 +289,7 @@ char *b64encode(const char *input) { char buf[32767] = {0}; DWORD retlen = 32767; - CryptBinaryToString((BYTE*) input, strlen(input), CRYPT_STRING_BASE64 | CRYPT_STRING_NOCRLF, buf, &retlen); + CryptBinaryToStringA((BYTE*) input, strlen(input), CRYPT_STRING_BASE64 | CRYPT_STRING_NOCRLF, buf, &retlen); return strdup(buf); } #endif @@ -297,9 +300,9 @@ start_searpc_server () register_rpc_service (); #ifdef WIN32 - DWORD bufCharCount = 32767; - char userNameBuf[bufCharCount]; - if (GetUserName(userNameBuf, &bufCharCount) == 0) { + char userNameBuf[32767]; + DWORD bufCharCount = sizeof(userNameBuf); + if (GetUserNameA(userNameBuf, &bufCharCount) == 0) { seaf_warning ("Failed to get user name, GLE=%lu, required size is %lu\n", GetLastError(), bufCharCount); return -1; diff --git a/daemon/seafile-session.c b/daemon/seafile-session.c index 416eed5d..bc527e9a 100644 --- a/daemon/seafile-session.c +++ b/daemon/seafile-session.c @@ -3,8 +3,10 @@ #include "common.h" #include +#ifndef WIN32 #include #include +#endif #include #include #include diff --git a/daemon/set-perm.c b/daemon/set-perm.c index 4bfed697..7a01e5c6 100644 --- a/daemon/set-perm.c +++ b/daemon/set-perm.c @@ -106,7 +106,7 @@ seaf_set_path_permission (const char *path, SeafPathPerm perm, gboolean recursiv ea.grfInheritance = (CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE); ea.Trustee.TrusteeForm = TRUSTEE_IS_NAME; ea.Trustee.TrusteeType = TRUSTEE_IS_USER; - ea.Trustee.ptstrName = "CURRENT_USER"; + ea.Trustee.ptstrName = L"CURRENT_USER"; // Create a new ACL that merges the new ACE // into the existing DACL. diff --git a/daemon/timer.c b/daemon/timer.c index 63a2c148..d4234406 100644 --- a/daemon/timer.c +++ b/daemon/timer.c @@ -8,7 +8,9 @@ #include #endif +#ifndef WIN32 #include +#endif #include "seafile-session.h" diff --git a/daemon/wt-monitor-win32.c b/daemon/wt-monitor-win32.c index 7f9decd9..76dd5ac4 100644 --- a/daemon/wt-monitor-win32.c +++ b/daemon/wt-monitor-win32.c @@ -7,9 +7,11 @@ #include -#include -#include +#ifndef WIN32 #include +#include +#endif +#include #include "job-mgr.h" #include "seafile-session.h" @@ -262,7 +264,7 @@ start_watch_cmd_pipe (SeafWTMonitor *monitor, OVERLAPPED *ol_in) HANDLE hPipe = (HANDLE)monitor->cmd_pipe[0]; - void *p = (void *)(&priv->cmd) + priv->cmd_bytes_read; + void *p = &priv->cmd + priv->cmd_bytes_read; int to_read = sizeof(WatchCommand) - priv->cmd_bytes_read; BOOL sts = ReadFile diff --git a/lib/db.c b/lib/db.c index e7b2606c..b99a5502 100644 --- a/lib/db.c +++ b/lib/db.c @@ -1,6 +1,8 @@ #include +#ifndef WIN32 #include +#endif #include "db.h" diff --git a/lib/include.h b/lib/include.h index b85703e6..92e797a3 100644 --- a/lib/include.h +++ b/lib/include.h @@ -1,7 +1,9 @@ -#include #include +#ifndef WIN32 +#include #include +#endif #include #include #include diff --git a/lib/net.c b/lib/net.c index 464e212d..18b7d112 100644 --- a/lib/net.c +++ b/lib/net.c @@ -8,7 +8,9 @@ #endif #include "include.h" +#ifndef WIN32 #include +#endif #include #include #include diff --git a/lib/repo.c b/lib/repo.c new file mode 100644 index 00000000..1628d6d8 --- /dev/null +++ b/lib/repo.c @@ -0,0 +1,2827 @@ +/* repo.c generated by valac 0.46.5, the Vala compiler + * generated from repo.vala, do not modify */ + +#include +#include +#include + +#define SEAFILE_TYPE_REPO (seafile_repo_get_type ()) +#define SEAFILE_REPO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_REPO, SeafileRepo)) +#define SEAFILE_REPO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_REPO, SeafileRepoClass)) +#define SEAFILE_IS_REPO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_REPO)) +#define SEAFILE_IS_REPO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_REPO)) +#define SEAFILE_REPO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_REPO, SeafileRepoClass)) + +typedef struct _SeafileRepo SeafileRepo; +typedef struct _SeafileRepoClass SeafileRepoClass; +typedef struct _SeafileRepoPrivate SeafileRepoPrivate; +enum { + SEAFILE_REPO_0_PROPERTY, + SEAFILE_REPO_ID_PROPERTY, + SEAFILE_REPO_NAME_PROPERTY, + SEAFILE_REPO_DESC_PROPERTY, + SEAFILE_REPO_VERSION_PROPERTY, + SEAFILE_REPO_LAST_MODIFY_PROPERTY, + SEAFILE_REPO_SIZE_PROPERTY, + SEAFILE_REPO_FILE_COUNT_PROPERTY, + SEAFILE_REPO_HEAD_CMMT_ID_PROPERTY, + SEAFILE_REPO_ROOT_PROPERTY, + SEAFILE_REPO_REPO_ID_PROPERTY, + SEAFILE_REPO_REPO_NAME_PROPERTY, + SEAFILE_REPO_REPO_DESC_PROPERTY, + SEAFILE_REPO_LAST_MODIFIED_PROPERTY, + SEAFILE_REPO_ENCRYPTED_PROPERTY, + SEAFILE_REPO_MAGIC_PROPERTY, + SEAFILE_REPO_ENC_VERSION_PROPERTY, + SEAFILE_REPO_RANDOM_KEY_PROPERTY, + SEAFILE_REPO_SALT_PROPERTY, + SEAFILE_REPO_WORKTREE_PROPERTY, + SEAFILE_REPO_RELAY_ID_PROPERTY, + SEAFILE_REPO_LAST_SYNC_TIME_PROPERTY, + SEAFILE_REPO_AUTO_SYNC_PROPERTY, + SEAFILE_REPO_WORKTREE_INVALID_PROPERTY, + SEAFILE_REPO_IS_VIRTUAL_PROPERTY, + SEAFILE_REPO_ORIGIN_REPO_ID_PROPERTY, + SEAFILE_REPO_ORIGIN_REPO_NAME_PROPERTY, + SEAFILE_REPO_ORIGIN_PATH_PROPERTY, + SEAFILE_REPO_IS_ORIGINAL_OWNER_PROPERTY, + SEAFILE_REPO_VIRTUAL_PERM_PROPERTY, + SEAFILE_REPO_STORE_ID_PROPERTY, + SEAFILE_REPO_IS_CORRUPTED_PROPERTY, + SEAFILE_REPO_REPAIRED_PROPERTY, + SEAFILE_REPO_SHARE_TYPE_PROPERTY, + SEAFILE_REPO_PERMISSION_PROPERTY, + SEAFILE_REPO_USER_PROPERTY, + SEAFILE_REPO_GROUP_ID_PROPERTY, + SEAFILE_REPO_IS_SHARED_PROPERTY, + SEAFILE_REPO_NUM_PROPERTIES +}; +static GParamSpec* seafile_repo_properties[SEAFILE_REPO_NUM_PROPERTIES]; +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define SEAFILE_TYPE_SYNC_TASK (seafile_sync_task_get_type ()) +#define SEAFILE_SYNC_TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_SYNC_TASK, SeafileSyncTask)) +#define SEAFILE_SYNC_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_SYNC_TASK, SeafileSyncTaskClass)) +#define SEAFILE_IS_SYNC_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_SYNC_TASK)) +#define SEAFILE_IS_SYNC_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_SYNC_TASK)) +#define SEAFILE_SYNC_TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_SYNC_TASK, SeafileSyncTaskClass)) + +typedef struct _SeafileSyncTask SeafileSyncTask; +typedef struct _SeafileSyncTaskClass SeafileSyncTaskClass; +typedef struct _SeafileSyncTaskPrivate SeafileSyncTaskPrivate; +enum { + SEAFILE_SYNC_TASK_0_PROPERTY, + SEAFILE_SYNC_TASK_FORCE_UPLOAD_PROPERTY, + SEAFILE_SYNC_TASK_REPO_ID_PROPERTY, + SEAFILE_SYNC_TASK_STATE_PROPERTY, + SEAFILE_SYNC_TASK_ERROR_PROPERTY, + SEAFILE_SYNC_TASK_NUM_PROPERTIES +}; +static GParamSpec* seafile_sync_task_properties[SEAFILE_SYNC_TASK_NUM_PROPERTIES]; + +#define SEAFILE_TYPE_SESSION_INFO (seafile_session_info_get_type ()) +#define SEAFILE_SESSION_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_SESSION_INFO, SeafileSessionInfo)) +#define SEAFILE_SESSION_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_SESSION_INFO, SeafileSessionInfoClass)) +#define SEAFILE_IS_SESSION_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_SESSION_INFO)) +#define SEAFILE_IS_SESSION_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_SESSION_INFO)) +#define SEAFILE_SESSION_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_SESSION_INFO, SeafileSessionInfoClass)) + +typedef struct _SeafileSessionInfo SeafileSessionInfo; +typedef struct _SeafileSessionInfoClass SeafileSessionInfoClass; +typedef struct _SeafileSessionInfoPrivate SeafileSessionInfoPrivate; +enum { + SEAFILE_SESSION_INFO_0_PROPERTY, + SEAFILE_SESSION_INFO_DATADIR_PROPERTY, + SEAFILE_SESSION_INFO_NUM_PROPERTIES +}; +static GParamSpec* seafile_session_info_properties[SEAFILE_SESSION_INFO_NUM_PROPERTIES]; + +#define SEAFILE_TYPE_DIFF_ENTRY (seafile_diff_entry_get_type ()) +#define SEAFILE_DIFF_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_DIFF_ENTRY, SeafileDiffEntry)) +#define SEAFILE_DIFF_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_DIFF_ENTRY, SeafileDiffEntryClass)) +#define SEAFILE_IS_DIFF_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_DIFF_ENTRY)) +#define SEAFILE_IS_DIFF_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_DIFF_ENTRY)) +#define SEAFILE_DIFF_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_DIFF_ENTRY, SeafileDiffEntryClass)) + +typedef struct _SeafileDiffEntry SeafileDiffEntry; +typedef struct _SeafileDiffEntryClass SeafileDiffEntryClass; +typedef struct _SeafileDiffEntryPrivate SeafileDiffEntryPrivate; +enum { + SEAFILE_DIFF_ENTRY_0_PROPERTY, + SEAFILE_DIFF_ENTRY_STATUS_PROPERTY, + SEAFILE_DIFF_ENTRY_NAME_PROPERTY, + SEAFILE_DIFF_ENTRY_NEW_NAME_PROPERTY, + SEAFILE_DIFF_ENTRY_NUM_PROPERTIES +}; +static GParamSpec* seafile_diff_entry_properties[SEAFILE_DIFF_ENTRY_NUM_PROPERTIES]; + +#define SEAFILE_TYPE_ENCRYPTION_INFO (seafile_encryption_info_get_type ()) +#define SEAFILE_ENCRYPTION_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_ENCRYPTION_INFO, SeafileEncryptionInfo)) +#define SEAFILE_ENCRYPTION_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_ENCRYPTION_INFO, SeafileEncryptionInfoClass)) +#define SEAFILE_IS_ENCRYPTION_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_ENCRYPTION_INFO)) +#define SEAFILE_IS_ENCRYPTION_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_ENCRYPTION_INFO)) +#define SEAFILE_ENCRYPTION_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_ENCRYPTION_INFO, SeafileEncryptionInfoClass)) + +typedef struct _SeafileEncryptionInfo SeafileEncryptionInfo; +typedef struct _SeafileEncryptionInfoClass SeafileEncryptionInfoClass; +typedef struct _SeafileEncryptionInfoPrivate SeafileEncryptionInfoPrivate; +enum { + SEAFILE_ENCRYPTION_INFO_0_PROPERTY, + SEAFILE_ENCRYPTION_INFO_REPO_ID_PROPERTY, + SEAFILE_ENCRYPTION_INFO_PASSWD_PROPERTY, + SEAFILE_ENCRYPTION_INFO_ENC_VERSION_PROPERTY, + SEAFILE_ENCRYPTION_INFO_MAGIC_PROPERTY, + SEAFILE_ENCRYPTION_INFO_RANDOM_KEY_PROPERTY, + SEAFILE_ENCRYPTION_INFO_SALT_PROPERTY, + SEAFILE_ENCRYPTION_INFO_NUM_PROPERTIES +}; +static GParamSpec* seafile_encryption_info_properties[SEAFILE_ENCRYPTION_INFO_NUM_PROPERTIES]; + +#define SEAFILE_TYPE_FILE_SYNC_ERROR (seafile_file_sync_error_get_type ()) +#define SEAFILE_FILE_SYNC_ERROR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_FILE_SYNC_ERROR, SeafileFileSyncError)) +#define SEAFILE_FILE_SYNC_ERROR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_FILE_SYNC_ERROR, SeafileFileSyncErrorClass)) +#define SEAFILE_IS_FILE_SYNC_ERROR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_FILE_SYNC_ERROR)) +#define SEAFILE_IS_FILE_SYNC_ERROR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_FILE_SYNC_ERROR)) +#define SEAFILE_FILE_SYNC_ERROR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_FILE_SYNC_ERROR, SeafileFileSyncErrorClass)) + +typedef struct _SeafileFileSyncError SeafileFileSyncError; +typedef struct _SeafileFileSyncErrorClass SeafileFileSyncErrorClass; +typedef struct _SeafileFileSyncErrorPrivate SeafileFileSyncErrorPrivate; +enum { + SEAFILE_FILE_SYNC_ERROR_0_PROPERTY, + SEAFILE_FILE_SYNC_ERROR_ID_PROPERTY, + SEAFILE_FILE_SYNC_ERROR_REPO_ID_PROPERTY, + SEAFILE_FILE_SYNC_ERROR_REPO_NAME_PROPERTY, + SEAFILE_FILE_SYNC_ERROR_PATH_PROPERTY, + SEAFILE_FILE_SYNC_ERROR_ERR_ID_PROPERTY, + SEAFILE_FILE_SYNC_ERROR_TIMESTAMP_PROPERTY, + SEAFILE_FILE_SYNC_ERROR_NUM_PROPERTIES +}; +static GParamSpec* seafile_file_sync_error_properties[SEAFILE_FILE_SYNC_ERROR_NUM_PROPERTIES]; + +struct _SeafileRepo { + GObject parent_instance; + SeafileRepoPrivate * priv; + gchar _id[37]; + gchar* _name; + gchar* _desc; + gchar* _worktree; + gchar* _relay_id; +}; + +struct _SeafileRepoClass { + GObjectClass parent_class; +}; + +struct _SeafileRepoPrivate { + gint _version; + gint _last_modify; + gint64 _size; + gint64 _file_count; + gchar* _head_cmmt_id; + gchar* _root; + gchar* _repo_id; + gchar* _repo_name; + gchar* _repo_desc; + gint _last_modified; + gboolean _encrypted; + gchar* _magic; + gint _enc_version; + gchar* _random_key; + gchar* _salt; + gint _last_sync_time; + gboolean _auto_sync; + gboolean _worktree_invalid; + gboolean _is_virtual; + gchar* _origin_repo_id; + gchar* _origin_repo_name; + gchar* _origin_path; + gboolean _is_original_owner; + gchar* _virtual_perm; + gchar* _store_id; + gboolean _is_corrupted; + gboolean _repaired; + gchar* _share_type; + gchar* _permission; + gchar* _user; + gint _group_id; + gboolean _is_shared; +}; + +struct _SeafileSyncTask { + GObject parent_instance; + SeafileSyncTaskPrivate * priv; +}; + +struct _SeafileSyncTaskClass { + GObjectClass parent_class; +}; + +struct _SeafileSyncTaskPrivate { + gboolean _force_upload; + gchar* _repo_id; + gchar* _state; + gint _error; +}; + +struct _SeafileSessionInfo { + GObject parent_instance; + SeafileSessionInfoPrivate * priv; +}; + +struct _SeafileSessionInfoClass { + GObjectClass parent_class; +}; + +struct _SeafileSessionInfoPrivate { + gchar* _datadir; +}; + +struct _SeafileDiffEntry { + GObject parent_instance; + SeafileDiffEntryPrivate * priv; +}; + +struct _SeafileDiffEntryClass { + GObjectClass parent_class; +}; + +struct _SeafileDiffEntryPrivate { + gchar* _status; + gchar* _name; + gchar* _new_name; +}; + +struct _SeafileEncryptionInfo { + GObject parent_instance; + SeafileEncryptionInfoPrivate * priv; +}; + +struct _SeafileEncryptionInfoClass { + GObjectClass parent_class; +}; + +struct _SeafileEncryptionInfoPrivate { + gchar* _repo_id; + gchar* _passwd; + gint _enc_version; + gchar* _magic; + gchar* _random_key; + gchar* _salt; +}; + +struct _SeafileFileSyncError { + GObject parent_instance; + SeafileFileSyncErrorPrivate * priv; +}; + +struct _SeafileFileSyncErrorClass { + GObjectClass parent_class; +}; + +struct _SeafileFileSyncErrorPrivate { + gint _id; + gchar* _repo_id; + gchar* _repo_name; + gchar* _path; + gint _err_id; + gint64 _timestamp; +}; + +static gint SeafileRepo_private_offset; +static gpointer seafile_repo_parent_class = NULL; +static gint SeafileSyncTask_private_offset; +static gpointer seafile_sync_task_parent_class = NULL; +static gint SeafileSessionInfo_private_offset; +static gpointer seafile_session_info_parent_class = NULL; +static gint SeafileDiffEntry_private_offset; +static gpointer seafile_diff_entry_parent_class = NULL; +static gint SeafileEncryptionInfo_private_offset; +static gpointer seafile_encryption_info_parent_class = NULL; +static gint SeafileFileSyncError_private_offset; +static gpointer seafile_file_sync_error_parent_class = NULL; + +GType seafile_repo_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileRepo, g_object_unref) +SeafileRepo* seafile_repo_new (void); +SeafileRepo* seafile_repo_construct (GType object_type); +const gchar* seafile_repo_get_id (SeafileRepo* self); +void seafile_repo_set_id (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_name (SeafileRepo* self); +void seafile_repo_set_name (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_desc (SeafileRepo* self); +void seafile_repo_set_desc (SeafileRepo* self, + const gchar* value); +gint seafile_repo_get_version (SeafileRepo* self); +void seafile_repo_set_version (SeafileRepo* self, + gint value); +gint seafile_repo_get_last_modify (SeafileRepo* self); +void seafile_repo_set_last_modify (SeafileRepo* self, + gint value); +gint64 seafile_repo_get_size (SeafileRepo* self); +void seafile_repo_set_size (SeafileRepo* self, + gint64 value); +gint64 seafile_repo_get_file_count (SeafileRepo* self); +void seafile_repo_set_file_count (SeafileRepo* self, + gint64 value); +const gchar* seafile_repo_get_head_cmmt_id (SeafileRepo* self); +void seafile_repo_set_head_cmmt_id (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_root (SeafileRepo* self); +void seafile_repo_set_root (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_repo_id (SeafileRepo* self); +void seafile_repo_set_repo_id (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_repo_name (SeafileRepo* self); +void seafile_repo_set_repo_name (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_repo_desc (SeafileRepo* self); +void seafile_repo_set_repo_desc (SeafileRepo* self, + const gchar* value); +gint seafile_repo_get_last_modified (SeafileRepo* self); +void seafile_repo_set_last_modified (SeafileRepo* self, + gint value); +gboolean seafile_repo_get_encrypted (SeafileRepo* self); +void seafile_repo_set_encrypted (SeafileRepo* self, + gboolean value); +const gchar* seafile_repo_get_magic (SeafileRepo* self); +void seafile_repo_set_magic (SeafileRepo* self, + const gchar* value); +gint seafile_repo_get_enc_version (SeafileRepo* self); +void seafile_repo_set_enc_version (SeafileRepo* self, + gint value); +const gchar* seafile_repo_get_random_key (SeafileRepo* self); +void seafile_repo_set_random_key (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_salt (SeafileRepo* self); +void seafile_repo_set_salt (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_worktree (SeafileRepo* self); +void seafile_repo_set_worktree (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_relay_id (SeafileRepo* self); +void seafile_repo_set_relay_id (SeafileRepo* self, + const gchar* value); +gint seafile_repo_get_last_sync_time (SeafileRepo* self); +void seafile_repo_set_last_sync_time (SeafileRepo* self, + gint value); +gboolean seafile_repo_get_auto_sync (SeafileRepo* self); +void seafile_repo_set_auto_sync (SeafileRepo* self, + gboolean value); +gboolean seafile_repo_get_worktree_invalid (SeafileRepo* self); +void seafile_repo_set_worktree_invalid (SeafileRepo* self, + gboolean value); +gboolean seafile_repo_get_is_virtual (SeafileRepo* self); +void seafile_repo_set_is_virtual (SeafileRepo* self, + gboolean value); +const gchar* seafile_repo_get_origin_repo_id (SeafileRepo* self); +void seafile_repo_set_origin_repo_id (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_origin_repo_name (SeafileRepo* self); +void seafile_repo_set_origin_repo_name (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_origin_path (SeafileRepo* self); +void seafile_repo_set_origin_path (SeafileRepo* self, + const gchar* value); +gboolean seafile_repo_get_is_original_owner (SeafileRepo* self); +void seafile_repo_set_is_original_owner (SeafileRepo* self, + gboolean value); +const gchar* seafile_repo_get_virtual_perm (SeafileRepo* self); +void seafile_repo_set_virtual_perm (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_store_id (SeafileRepo* self); +void seafile_repo_set_store_id (SeafileRepo* self, + const gchar* value); +gboolean seafile_repo_get_is_corrupted (SeafileRepo* self); +void seafile_repo_set_is_corrupted (SeafileRepo* self, + gboolean value); +gboolean seafile_repo_get_repaired (SeafileRepo* self); +void seafile_repo_set_repaired (SeafileRepo* self, + gboolean value); +const gchar* seafile_repo_get_share_type (SeafileRepo* self); +void seafile_repo_set_share_type (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_permission (SeafileRepo* self); +void seafile_repo_set_permission (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_user (SeafileRepo* self); +void seafile_repo_set_user (SeafileRepo* self, + const gchar* value); +gint seafile_repo_get_group_id (SeafileRepo* self); +void seafile_repo_set_group_id (SeafileRepo* self, + gint value); +gboolean seafile_repo_get_is_shared (SeafileRepo* self); +void seafile_repo_set_is_shared (SeafileRepo* self, + gboolean value); +static void seafile_repo_finalize (GObject * obj); +static void _vala_seafile_repo_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_seafile_repo_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +GType seafile_sync_task_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileSyncTask, g_object_unref) +SeafileSyncTask* seafile_sync_task_new (void); +SeafileSyncTask* seafile_sync_task_construct (GType object_type); +gboolean seafile_sync_task_get_force_upload (SeafileSyncTask* self); +void seafile_sync_task_set_force_upload (SeafileSyncTask* self, + gboolean value); +const gchar* seafile_sync_task_get_repo_id (SeafileSyncTask* self); +void seafile_sync_task_set_repo_id (SeafileSyncTask* self, + const gchar* value); +const gchar* seafile_sync_task_get_state (SeafileSyncTask* self); +void seafile_sync_task_set_state (SeafileSyncTask* self, + const gchar* value); +gint seafile_sync_task_get_error (SeafileSyncTask* self); +void seafile_sync_task_set_error (SeafileSyncTask* self, + gint value); +static void seafile_sync_task_finalize (GObject * obj); +static void _vala_seafile_sync_task_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_seafile_sync_task_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +GType seafile_session_info_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileSessionInfo, g_object_unref) +SeafileSessionInfo* seafile_session_info_new (void); +SeafileSessionInfo* seafile_session_info_construct (GType object_type); +const gchar* seafile_session_info_get_datadir (SeafileSessionInfo* self); +void seafile_session_info_set_datadir (SeafileSessionInfo* self, + const gchar* value); +static void seafile_session_info_finalize (GObject * obj); +static void _vala_seafile_session_info_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_seafile_session_info_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +GType seafile_diff_entry_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileDiffEntry, g_object_unref) +SeafileDiffEntry* seafile_diff_entry_new (void); +SeafileDiffEntry* seafile_diff_entry_construct (GType object_type); +const gchar* seafile_diff_entry_get_status (SeafileDiffEntry* self); +void seafile_diff_entry_set_status (SeafileDiffEntry* self, + const gchar* value); +const gchar* seafile_diff_entry_get_name (SeafileDiffEntry* self); +void seafile_diff_entry_set_name (SeafileDiffEntry* self, + const gchar* value); +const gchar* seafile_diff_entry_get_new_name (SeafileDiffEntry* self); +void seafile_diff_entry_set_new_name (SeafileDiffEntry* self, + const gchar* value); +static void seafile_diff_entry_finalize (GObject * obj); +static void _vala_seafile_diff_entry_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_seafile_diff_entry_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +GType seafile_encryption_info_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileEncryptionInfo, g_object_unref) +SeafileEncryptionInfo* seafile_encryption_info_new (void); +SeafileEncryptionInfo* seafile_encryption_info_construct (GType object_type); +const gchar* seafile_encryption_info_get_repo_id (SeafileEncryptionInfo* self); +void seafile_encryption_info_set_repo_id (SeafileEncryptionInfo* self, + const gchar* value); +const gchar* seafile_encryption_info_get_passwd (SeafileEncryptionInfo* self); +void seafile_encryption_info_set_passwd (SeafileEncryptionInfo* self, + const gchar* value); +gint seafile_encryption_info_get_enc_version (SeafileEncryptionInfo* self); +void seafile_encryption_info_set_enc_version (SeafileEncryptionInfo* self, + gint value); +const gchar* seafile_encryption_info_get_magic (SeafileEncryptionInfo* self); +void seafile_encryption_info_set_magic (SeafileEncryptionInfo* self, + const gchar* value); +const gchar* seafile_encryption_info_get_random_key (SeafileEncryptionInfo* self); +void seafile_encryption_info_set_random_key (SeafileEncryptionInfo* self, + const gchar* value); +const gchar* seafile_encryption_info_get_salt (SeafileEncryptionInfo* self); +void seafile_encryption_info_set_salt (SeafileEncryptionInfo* self, + const gchar* value); +static void seafile_encryption_info_finalize (GObject * obj); +static void _vala_seafile_encryption_info_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_seafile_encryption_info_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +GType seafile_file_sync_error_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileFileSyncError, g_object_unref) +SeafileFileSyncError* seafile_file_sync_error_new (void); +SeafileFileSyncError* seafile_file_sync_error_construct (GType object_type); +gint seafile_file_sync_error_get_id (SeafileFileSyncError* self); +void seafile_file_sync_error_set_id (SeafileFileSyncError* self, + gint value); +const gchar* seafile_file_sync_error_get_repo_id (SeafileFileSyncError* self); +void seafile_file_sync_error_set_repo_id (SeafileFileSyncError* self, + const gchar* value); +const gchar* seafile_file_sync_error_get_repo_name (SeafileFileSyncError* self); +void seafile_file_sync_error_set_repo_name (SeafileFileSyncError* self, + const gchar* value); +const gchar* seafile_file_sync_error_get_path (SeafileFileSyncError* self); +void seafile_file_sync_error_set_path (SeafileFileSyncError* self, + const gchar* value); +gint seafile_file_sync_error_get_err_id (SeafileFileSyncError* self); +void seafile_file_sync_error_set_err_id (SeafileFileSyncError* self, + gint value); +gint64 seafile_file_sync_error_get_timestamp (SeafileFileSyncError* self); +void seafile_file_sync_error_set_timestamp (SeafileFileSyncError* self, + gint64 value); +static void seafile_file_sync_error_finalize (GObject * obj); +static void _vala_seafile_file_sync_error_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_seafile_file_sync_error_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); + +static inline gpointer +seafile_repo_get_instance_private (SeafileRepo* self) +{ + return G_STRUCT_MEMBER_P (self, SeafileRepo_private_offset); +} + +SeafileRepo* +seafile_repo_construct (GType object_type) +{ + SeafileRepo * self = NULL; + self = (SeafileRepo*) g_object_new (object_type, NULL); + return self; +} + +SeafileRepo* +seafile_repo_new (void) +{ + return seafile_repo_construct (SEAFILE_TYPE_REPO); +} + +const gchar* +seafile_repo_get_id (SeafileRepo* self) +{ + const gchar* result; + g_return_val_if_fail (self != NULL, NULL); + result = (const gchar*) self->_id; + return result; +} + +void +seafile_repo_set_id (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + memcpy (self->_id, value, (gsize) 36); + self->_id[36] = '\0'; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_ID_PROPERTY]); +} + +const gchar* +seafile_repo_get_name (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->_name; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_name (SeafileRepo* self, + const gchar* value) +{ + gchar* _tmp0_; + g_return_if_fail (self != NULL); + _tmp0_ = g_strdup (value); + _g_free0 (self->_name); + self->_name = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_NAME_PROPERTY]); +} + +const gchar* +seafile_repo_get_desc (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->_desc; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_desc (SeafileRepo* self, + const gchar* value) +{ + gchar* _tmp0_; + g_return_if_fail (self != NULL); + _tmp0_ = g_strdup (value); + _g_free0 (self->_desc); + self->_desc = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_DESC_PROPERTY]); +} + +gint +seafile_repo_get_version (SeafileRepo* self) +{ + gint result; + g_return_val_if_fail (self != NULL, 0); + result = self->priv->_version; + return result; +} + +void +seafile_repo_set_version (SeafileRepo* self, + gint value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_version (self) != value) { + self->priv->_version = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_VERSION_PROPERTY]); + } +} + +gint +seafile_repo_get_last_modify (SeafileRepo* self) +{ + gint result; + g_return_val_if_fail (self != NULL, 0); + result = self->priv->_last_modify; + return result; +} + +void +seafile_repo_set_last_modify (SeafileRepo* self, + gint value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_last_modify (self) != value) { + self->priv->_last_modify = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_LAST_MODIFY_PROPERTY]); + } +} + +gint64 +seafile_repo_get_size (SeafileRepo* self) +{ + gint64 result; + g_return_val_if_fail (self != NULL, 0LL); + result = self->priv->_size; + return result; +} + +void +seafile_repo_set_size (SeafileRepo* self, + gint64 value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_size (self) != value) { + self->priv->_size = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_SIZE_PROPERTY]); + } +} + +gint64 +seafile_repo_get_file_count (SeafileRepo* self) +{ + gint64 result; + g_return_val_if_fail (self != NULL, 0LL); + result = self->priv->_file_count; + return result; +} + +void +seafile_repo_set_file_count (SeafileRepo* self, + gint64 value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_file_count (self) != value) { + self->priv->_file_count = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_FILE_COUNT_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_head_cmmt_id (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_head_cmmt_id; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_head_cmmt_id (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_head_cmmt_id (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_head_cmmt_id); + self->priv->_head_cmmt_id = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_HEAD_CMMT_ID_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_root (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_root; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_root (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_root (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_root); + self->priv->_root = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_ROOT_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_repo_id (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_repo_id; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_repo_id (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_repo_id (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_repo_id); + self->priv->_repo_id = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_REPO_ID_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_repo_name (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_repo_name; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_repo_name (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_repo_name (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_repo_name); + self->priv->_repo_name = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_REPO_NAME_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_repo_desc (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_repo_desc; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_repo_desc (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_repo_desc (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_repo_desc); + self->priv->_repo_desc = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_REPO_DESC_PROPERTY]); + } +} + +gint +seafile_repo_get_last_modified (SeafileRepo* self) +{ + gint result; + g_return_val_if_fail (self != NULL, 0); + result = self->priv->_last_modified; + return result; +} + +void +seafile_repo_set_last_modified (SeafileRepo* self, + gint value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_last_modified (self) != value) { + self->priv->_last_modified = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_LAST_MODIFIED_PROPERTY]); + } +} + +gboolean +seafile_repo_get_encrypted (SeafileRepo* self) +{ + gboolean result; + g_return_val_if_fail (self != NULL, FALSE); + result = self->priv->_encrypted; + return result; +} + +void +seafile_repo_set_encrypted (SeafileRepo* self, + gboolean value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_encrypted (self) != value) { + self->priv->_encrypted = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_ENCRYPTED_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_magic (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_magic; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_magic (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_magic (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_magic); + self->priv->_magic = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_MAGIC_PROPERTY]); + } +} + +gint +seafile_repo_get_enc_version (SeafileRepo* self) +{ + gint result; + g_return_val_if_fail (self != NULL, 0); + result = self->priv->_enc_version; + return result; +} + +void +seafile_repo_set_enc_version (SeafileRepo* self, + gint value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_enc_version (self) != value) { + self->priv->_enc_version = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_ENC_VERSION_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_random_key (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_random_key; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_random_key (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_random_key (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_random_key); + self->priv->_random_key = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_RANDOM_KEY_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_salt (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_salt; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_salt (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_salt (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_salt); + self->priv->_salt = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_SALT_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_worktree (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->_worktree; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_worktree (SeafileRepo* self, + const gchar* value) +{ + gchar* _tmp0_; + g_return_if_fail (self != NULL); + _tmp0_ = g_strdup (value); + _g_free0 (self->_worktree); + self->_worktree = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_WORKTREE_PROPERTY]); +} + +const gchar* +seafile_repo_get_relay_id (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->_relay_id; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_relay_id (SeafileRepo* self, + const gchar* value) +{ + gchar* _tmp0_; + g_return_if_fail (self != NULL); + _tmp0_ = g_strdup (value); + _g_free0 (self->_relay_id); + self->_relay_id = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_RELAY_ID_PROPERTY]); +} + +gint +seafile_repo_get_last_sync_time (SeafileRepo* self) +{ + gint result; + g_return_val_if_fail (self != NULL, 0); + result = self->priv->_last_sync_time; + return result; +} + +void +seafile_repo_set_last_sync_time (SeafileRepo* self, + gint value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_last_sync_time (self) != value) { + self->priv->_last_sync_time = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_LAST_SYNC_TIME_PROPERTY]); + } +} + +gboolean +seafile_repo_get_auto_sync (SeafileRepo* self) +{ + gboolean result; + g_return_val_if_fail (self != NULL, FALSE); + result = self->priv->_auto_sync; + return result; +} + +void +seafile_repo_set_auto_sync (SeafileRepo* self, + gboolean value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_auto_sync (self) != value) { + self->priv->_auto_sync = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_AUTO_SYNC_PROPERTY]); + } +} + +gboolean +seafile_repo_get_worktree_invalid (SeafileRepo* self) +{ + gboolean result; + g_return_val_if_fail (self != NULL, FALSE); + result = self->priv->_worktree_invalid; + return result; +} + +void +seafile_repo_set_worktree_invalid (SeafileRepo* self, + gboolean value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_worktree_invalid (self) != value) { + self->priv->_worktree_invalid = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_WORKTREE_INVALID_PROPERTY]); + } +} + +gboolean +seafile_repo_get_is_virtual (SeafileRepo* self) +{ + gboolean result; + g_return_val_if_fail (self != NULL, FALSE); + result = self->priv->_is_virtual; + return result; +} + +void +seafile_repo_set_is_virtual (SeafileRepo* self, + gboolean value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_is_virtual (self) != value) { + self->priv->_is_virtual = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_IS_VIRTUAL_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_origin_repo_id (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_origin_repo_id; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_origin_repo_id (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_origin_repo_id (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_origin_repo_id); + self->priv->_origin_repo_id = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_ORIGIN_REPO_ID_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_origin_repo_name (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_origin_repo_name; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_origin_repo_name (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_origin_repo_name (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_origin_repo_name); + self->priv->_origin_repo_name = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_ORIGIN_REPO_NAME_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_origin_path (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_origin_path; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_origin_path (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_origin_path (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_origin_path); + self->priv->_origin_path = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_ORIGIN_PATH_PROPERTY]); + } +} + +gboolean +seafile_repo_get_is_original_owner (SeafileRepo* self) +{ + gboolean result; + g_return_val_if_fail (self != NULL, FALSE); + result = self->priv->_is_original_owner; + return result; +} + +void +seafile_repo_set_is_original_owner (SeafileRepo* self, + gboolean value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_is_original_owner (self) != value) { + self->priv->_is_original_owner = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_IS_ORIGINAL_OWNER_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_virtual_perm (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_virtual_perm; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_virtual_perm (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_virtual_perm (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_virtual_perm); + self->priv->_virtual_perm = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_VIRTUAL_PERM_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_store_id (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_store_id; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_store_id (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_store_id (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_store_id); + self->priv->_store_id = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_STORE_ID_PROPERTY]); + } +} + +gboolean +seafile_repo_get_is_corrupted (SeafileRepo* self) +{ + gboolean result; + g_return_val_if_fail (self != NULL, FALSE); + result = self->priv->_is_corrupted; + return result; +} + +void +seafile_repo_set_is_corrupted (SeafileRepo* self, + gboolean value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_is_corrupted (self) != value) { + self->priv->_is_corrupted = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_IS_CORRUPTED_PROPERTY]); + } +} + +gboolean +seafile_repo_get_repaired (SeafileRepo* self) +{ + gboolean result; + g_return_val_if_fail (self != NULL, FALSE); + result = self->priv->_repaired; + return result; +} + +void +seafile_repo_set_repaired (SeafileRepo* self, + gboolean value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_repaired (self) != value) { + self->priv->_repaired = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_REPAIRED_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_share_type (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_share_type; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_share_type (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_share_type (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_share_type); + self->priv->_share_type = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_SHARE_TYPE_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_permission (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_permission; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_permission (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_permission (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_permission); + self->priv->_permission = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_PERMISSION_PROPERTY]); + } +} + +const gchar* +seafile_repo_get_user (SeafileRepo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_user; + result = _tmp0_; + return result; +} + +void +seafile_repo_set_user (SeafileRepo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_repo_get_user (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_user); + self->priv->_user = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_USER_PROPERTY]); + } +} + +gint +seafile_repo_get_group_id (SeafileRepo* self) +{ + gint result; + g_return_val_if_fail (self != NULL, 0); + result = self->priv->_group_id; + return result; +} + +void +seafile_repo_set_group_id (SeafileRepo* self, + gint value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_group_id (self) != value) { + self->priv->_group_id = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_GROUP_ID_PROPERTY]); + } +} + +gboolean +seafile_repo_get_is_shared (SeafileRepo* self) +{ + gboolean result; + g_return_val_if_fail (self != NULL, FALSE); + result = self->priv->_is_shared; + return result; +} + +void +seafile_repo_set_is_shared (SeafileRepo* self, + gboolean value) +{ + g_return_if_fail (self != NULL); + if (seafile_repo_get_is_shared (self) != value) { + self->priv->_is_shared = value; + g_object_notify_by_pspec ((GObject *) self, seafile_repo_properties[SEAFILE_REPO_IS_SHARED_PROPERTY]); + } +} + +static void +seafile_repo_class_init (SeafileRepoClass * klass, + gpointer klass_data) +{ + seafile_repo_parent_class = g_type_class_peek_parent (klass); + g_type_class_adjust_private_offset (klass, &SeafileRepo_private_offset); + G_OBJECT_CLASS (klass)->get_property = _vala_seafile_repo_get_property; + G_OBJECT_CLASS (klass)->set_property = _vala_seafile_repo_set_property; + G_OBJECT_CLASS (klass)->finalize = seafile_repo_finalize; + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_ID_PROPERTY, seafile_repo_properties[SEAFILE_REPO_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_NAME_PROPERTY, seafile_repo_properties[SEAFILE_REPO_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_DESC_PROPERTY, seafile_repo_properties[SEAFILE_REPO_DESC_PROPERTY] = g_param_spec_string ("desc", "desc", "desc", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_VERSION_PROPERTY, seafile_repo_properties[SEAFILE_REPO_VERSION_PROPERTY] = g_param_spec_int ("version", "version", "version", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_LAST_MODIFY_PROPERTY, seafile_repo_properties[SEAFILE_REPO_LAST_MODIFY_PROPERTY] = g_param_spec_int ("last-modify", "last-modify", "last-modify", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_SIZE_PROPERTY, seafile_repo_properties[SEAFILE_REPO_SIZE_PROPERTY] = g_param_spec_int64 ("size", "size", "size", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_FILE_COUNT_PROPERTY, seafile_repo_properties[SEAFILE_REPO_FILE_COUNT_PROPERTY] = g_param_spec_int64 ("file-count", "file-count", "file-count", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_HEAD_CMMT_ID_PROPERTY, seafile_repo_properties[SEAFILE_REPO_HEAD_CMMT_ID_PROPERTY] = g_param_spec_string ("head-cmmt-id", "head-cmmt-id", "head-cmmt-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_ROOT_PROPERTY, seafile_repo_properties[SEAFILE_REPO_ROOT_PROPERTY] = g_param_spec_string ("root", "root", "root", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_REPO_ID_PROPERTY, seafile_repo_properties[SEAFILE_REPO_REPO_ID_PROPERTY] = g_param_spec_string ("repo-id", "repo-id", "repo-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_REPO_NAME_PROPERTY, seafile_repo_properties[SEAFILE_REPO_REPO_NAME_PROPERTY] = g_param_spec_string ("repo-name", "repo-name", "repo-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_REPO_DESC_PROPERTY, seafile_repo_properties[SEAFILE_REPO_REPO_DESC_PROPERTY] = g_param_spec_string ("repo-desc", "repo-desc", "repo-desc", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_LAST_MODIFIED_PROPERTY, seafile_repo_properties[SEAFILE_REPO_LAST_MODIFIED_PROPERTY] = g_param_spec_int ("last-modified", "last-modified", "last-modified", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_ENCRYPTED_PROPERTY, seafile_repo_properties[SEAFILE_REPO_ENCRYPTED_PROPERTY] = g_param_spec_boolean ("encrypted", "encrypted", "encrypted", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_MAGIC_PROPERTY, seafile_repo_properties[SEAFILE_REPO_MAGIC_PROPERTY] = g_param_spec_string ("magic", "magic", "magic", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_ENC_VERSION_PROPERTY, seafile_repo_properties[SEAFILE_REPO_ENC_VERSION_PROPERTY] = g_param_spec_int ("enc-version", "enc-version", "enc-version", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_RANDOM_KEY_PROPERTY, seafile_repo_properties[SEAFILE_REPO_RANDOM_KEY_PROPERTY] = g_param_spec_string ("random-key", "random-key", "random-key", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_SALT_PROPERTY, seafile_repo_properties[SEAFILE_REPO_SALT_PROPERTY] = g_param_spec_string ("salt", "salt", "salt", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_WORKTREE_PROPERTY, seafile_repo_properties[SEAFILE_REPO_WORKTREE_PROPERTY] = g_param_spec_string ("worktree", "worktree", "worktree", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_RELAY_ID_PROPERTY, seafile_repo_properties[SEAFILE_REPO_RELAY_ID_PROPERTY] = g_param_spec_string ("relay-id", "relay-id", "relay-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_LAST_SYNC_TIME_PROPERTY, seafile_repo_properties[SEAFILE_REPO_LAST_SYNC_TIME_PROPERTY] = g_param_spec_int ("last-sync-time", "last-sync-time", "last-sync-time", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_AUTO_SYNC_PROPERTY, seafile_repo_properties[SEAFILE_REPO_AUTO_SYNC_PROPERTY] = g_param_spec_boolean ("auto-sync", "auto-sync", "auto-sync", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_WORKTREE_INVALID_PROPERTY, seafile_repo_properties[SEAFILE_REPO_WORKTREE_INVALID_PROPERTY] = g_param_spec_boolean ("worktree-invalid", "worktree-invalid", "worktree-invalid", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_IS_VIRTUAL_PROPERTY, seafile_repo_properties[SEAFILE_REPO_IS_VIRTUAL_PROPERTY] = g_param_spec_boolean ("is-virtual", "is-virtual", "is-virtual", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_ORIGIN_REPO_ID_PROPERTY, seafile_repo_properties[SEAFILE_REPO_ORIGIN_REPO_ID_PROPERTY] = g_param_spec_string ("origin-repo-id", "origin-repo-id", "origin-repo-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_ORIGIN_REPO_NAME_PROPERTY, seafile_repo_properties[SEAFILE_REPO_ORIGIN_REPO_NAME_PROPERTY] = g_param_spec_string ("origin-repo-name", "origin-repo-name", "origin-repo-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_ORIGIN_PATH_PROPERTY, seafile_repo_properties[SEAFILE_REPO_ORIGIN_PATH_PROPERTY] = g_param_spec_string ("origin-path", "origin-path", "origin-path", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_IS_ORIGINAL_OWNER_PROPERTY, seafile_repo_properties[SEAFILE_REPO_IS_ORIGINAL_OWNER_PROPERTY] = g_param_spec_boolean ("is-original-owner", "is-original-owner", "is-original-owner", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_VIRTUAL_PERM_PROPERTY, seafile_repo_properties[SEAFILE_REPO_VIRTUAL_PERM_PROPERTY] = g_param_spec_string ("virtual-perm", "virtual-perm", "virtual-perm", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_STORE_ID_PROPERTY, seafile_repo_properties[SEAFILE_REPO_STORE_ID_PROPERTY] = g_param_spec_string ("store-id", "store-id", "store-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_IS_CORRUPTED_PROPERTY, seafile_repo_properties[SEAFILE_REPO_IS_CORRUPTED_PROPERTY] = g_param_spec_boolean ("is-corrupted", "is-corrupted", "is-corrupted", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_REPAIRED_PROPERTY, seafile_repo_properties[SEAFILE_REPO_REPAIRED_PROPERTY] = g_param_spec_boolean ("repaired", "repaired", "repaired", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_SHARE_TYPE_PROPERTY, seafile_repo_properties[SEAFILE_REPO_SHARE_TYPE_PROPERTY] = g_param_spec_string ("share-type", "share-type", "share-type", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_PERMISSION_PROPERTY, seafile_repo_properties[SEAFILE_REPO_PERMISSION_PROPERTY] = g_param_spec_string ("permission", "permission", "permission", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_USER_PROPERTY, seafile_repo_properties[SEAFILE_REPO_USER_PROPERTY] = g_param_spec_string ("user", "user", "user", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_GROUP_ID_PROPERTY, seafile_repo_properties[SEAFILE_REPO_GROUP_ID_PROPERTY] = g_param_spec_int ("group-id", "group-id", "group-id", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_REPO_IS_SHARED_PROPERTY, seafile_repo_properties[SEAFILE_REPO_IS_SHARED_PROPERTY] = g_param_spec_boolean ("is-shared", "is-shared", "is-shared", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +} + +static void +seafile_repo_instance_init (SeafileRepo * self, + gpointer klass) +{ + self->priv = seafile_repo_get_instance_private (self); +} + +static void +seafile_repo_finalize (GObject * obj) +{ + SeafileRepo * self; + self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEAFILE_TYPE_REPO, SeafileRepo); + _g_free0 (self->_name); + _g_free0 (self->_desc); + _g_free0 (self->priv->_head_cmmt_id); + _g_free0 (self->priv->_root); + _g_free0 (self->priv->_repo_id); + _g_free0 (self->priv->_repo_name); + _g_free0 (self->priv->_repo_desc); + _g_free0 (self->priv->_magic); + _g_free0 (self->priv->_random_key); + _g_free0 (self->priv->_salt); + _g_free0 (self->_worktree); + _g_free0 (self->_relay_id); + _g_free0 (self->priv->_origin_repo_id); + _g_free0 (self->priv->_origin_repo_name); + _g_free0 (self->priv->_origin_path); + _g_free0 (self->priv->_virtual_perm); + _g_free0 (self->priv->_store_id); + _g_free0 (self->priv->_share_type); + _g_free0 (self->priv->_permission); + _g_free0 (self->priv->_user); + G_OBJECT_CLASS (seafile_repo_parent_class)->finalize (obj); +} + +GType +seafile_repo_get_type (void) +{ + static volatile gsize seafile_repo_type_id__volatile = 0; + if (g_once_init_enter (&seafile_repo_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (SeafileRepoClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) seafile_repo_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeafileRepo), 0, (GInstanceInitFunc) seafile_repo_instance_init, NULL }; + GType seafile_repo_type_id; + seafile_repo_type_id = g_type_register_static (G_TYPE_OBJECT, "SeafileRepo", &g_define_type_info, 0); + SeafileRepo_private_offset = g_type_add_instance_private (seafile_repo_type_id, sizeof (SeafileRepoPrivate)); + g_once_init_leave (&seafile_repo_type_id__volatile, seafile_repo_type_id); + } + return seafile_repo_type_id__volatile; +} + +static void +_vala_seafile_repo_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + SeafileRepo * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_REPO, SeafileRepo); + switch (property_id) { + case SEAFILE_REPO_ID_PROPERTY: + g_value_set_string (value, seafile_repo_get_id (self)); + break; + case SEAFILE_REPO_NAME_PROPERTY: + g_value_set_string (value, seafile_repo_get_name (self)); + break; + case SEAFILE_REPO_DESC_PROPERTY: + g_value_set_string (value, seafile_repo_get_desc (self)); + break; + case SEAFILE_REPO_VERSION_PROPERTY: + g_value_set_int (value, seafile_repo_get_version (self)); + break; + case SEAFILE_REPO_LAST_MODIFY_PROPERTY: + g_value_set_int (value, seafile_repo_get_last_modify (self)); + break; + case SEAFILE_REPO_SIZE_PROPERTY: + g_value_set_int64 (value, seafile_repo_get_size (self)); + break; + case SEAFILE_REPO_FILE_COUNT_PROPERTY: + g_value_set_int64 (value, seafile_repo_get_file_count (self)); + break; + case SEAFILE_REPO_HEAD_CMMT_ID_PROPERTY: + g_value_set_string (value, seafile_repo_get_head_cmmt_id (self)); + break; + case SEAFILE_REPO_ROOT_PROPERTY: + g_value_set_string (value, seafile_repo_get_root (self)); + break; + case SEAFILE_REPO_REPO_ID_PROPERTY: + g_value_set_string (value, seafile_repo_get_repo_id (self)); + break; + case SEAFILE_REPO_REPO_NAME_PROPERTY: + g_value_set_string (value, seafile_repo_get_repo_name (self)); + break; + case SEAFILE_REPO_REPO_DESC_PROPERTY: + g_value_set_string (value, seafile_repo_get_repo_desc (self)); + break; + case SEAFILE_REPO_LAST_MODIFIED_PROPERTY: + g_value_set_int (value, seafile_repo_get_last_modified (self)); + break; + case SEAFILE_REPO_ENCRYPTED_PROPERTY: + g_value_set_boolean (value, seafile_repo_get_encrypted (self)); + break; + case SEAFILE_REPO_MAGIC_PROPERTY: + g_value_set_string (value, seafile_repo_get_magic (self)); + break; + case SEAFILE_REPO_ENC_VERSION_PROPERTY: + g_value_set_int (value, seafile_repo_get_enc_version (self)); + break; + case SEAFILE_REPO_RANDOM_KEY_PROPERTY: + g_value_set_string (value, seafile_repo_get_random_key (self)); + break; + case SEAFILE_REPO_SALT_PROPERTY: + g_value_set_string (value, seafile_repo_get_salt (self)); + break; + case SEAFILE_REPO_WORKTREE_PROPERTY: + g_value_set_string (value, seafile_repo_get_worktree (self)); + break; + case SEAFILE_REPO_RELAY_ID_PROPERTY: + g_value_set_string (value, seafile_repo_get_relay_id (self)); + break; + case SEAFILE_REPO_LAST_SYNC_TIME_PROPERTY: + g_value_set_int (value, seafile_repo_get_last_sync_time (self)); + break; + case SEAFILE_REPO_AUTO_SYNC_PROPERTY: + g_value_set_boolean (value, seafile_repo_get_auto_sync (self)); + break; + case SEAFILE_REPO_WORKTREE_INVALID_PROPERTY: + g_value_set_boolean (value, seafile_repo_get_worktree_invalid (self)); + break; + case SEAFILE_REPO_IS_VIRTUAL_PROPERTY: + g_value_set_boolean (value, seafile_repo_get_is_virtual (self)); + break; + case SEAFILE_REPO_ORIGIN_REPO_ID_PROPERTY: + g_value_set_string (value, seafile_repo_get_origin_repo_id (self)); + break; + case SEAFILE_REPO_ORIGIN_REPO_NAME_PROPERTY: + g_value_set_string (value, seafile_repo_get_origin_repo_name (self)); + break; + case SEAFILE_REPO_ORIGIN_PATH_PROPERTY: + g_value_set_string (value, seafile_repo_get_origin_path (self)); + break; + case SEAFILE_REPO_IS_ORIGINAL_OWNER_PROPERTY: + g_value_set_boolean (value, seafile_repo_get_is_original_owner (self)); + break; + case SEAFILE_REPO_VIRTUAL_PERM_PROPERTY: + g_value_set_string (value, seafile_repo_get_virtual_perm (self)); + break; + case SEAFILE_REPO_STORE_ID_PROPERTY: + g_value_set_string (value, seafile_repo_get_store_id (self)); + break; + case SEAFILE_REPO_IS_CORRUPTED_PROPERTY: + g_value_set_boolean (value, seafile_repo_get_is_corrupted (self)); + break; + case SEAFILE_REPO_REPAIRED_PROPERTY: + g_value_set_boolean (value, seafile_repo_get_repaired (self)); + break; + case SEAFILE_REPO_SHARE_TYPE_PROPERTY: + g_value_set_string (value, seafile_repo_get_share_type (self)); + break; + case SEAFILE_REPO_PERMISSION_PROPERTY: + g_value_set_string (value, seafile_repo_get_permission (self)); + break; + case SEAFILE_REPO_USER_PROPERTY: + g_value_set_string (value, seafile_repo_get_user (self)); + break; + case SEAFILE_REPO_GROUP_ID_PROPERTY: + g_value_set_int (value, seafile_repo_get_group_id (self)); + break; + case SEAFILE_REPO_IS_SHARED_PROPERTY: + g_value_set_boolean (value, seafile_repo_get_is_shared (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +_vala_seafile_repo_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + SeafileRepo * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_REPO, SeafileRepo); + switch (property_id) { + case SEAFILE_REPO_ID_PROPERTY: + seafile_repo_set_id (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_NAME_PROPERTY: + seafile_repo_set_name (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_DESC_PROPERTY: + seafile_repo_set_desc (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_VERSION_PROPERTY: + seafile_repo_set_version (self, g_value_get_int (value)); + break; + case SEAFILE_REPO_LAST_MODIFY_PROPERTY: + seafile_repo_set_last_modify (self, g_value_get_int (value)); + break; + case SEAFILE_REPO_SIZE_PROPERTY: + seafile_repo_set_size (self, g_value_get_int64 (value)); + break; + case SEAFILE_REPO_FILE_COUNT_PROPERTY: + seafile_repo_set_file_count (self, g_value_get_int64 (value)); + break; + case SEAFILE_REPO_HEAD_CMMT_ID_PROPERTY: + seafile_repo_set_head_cmmt_id (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_ROOT_PROPERTY: + seafile_repo_set_root (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_REPO_ID_PROPERTY: + seafile_repo_set_repo_id (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_REPO_NAME_PROPERTY: + seafile_repo_set_repo_name (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_REPO_DESC_PROPERTY: + seafile_repo_set_repo_desc (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_LAST_MODIFIED_PROPERTY: + seafile_repo_set_last_modified (self, g_value_get_int (value)); + break; + case SEAFILE_REPO_ENCRYPTED_PROPERTY: + seafile_repo_set_encrypted (self, g_value_get_boolean (value)); + break; + case SEAFILE_REPO_MAGIC_PROPERTY: + seafile_repo_set_magic (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_ENC_VERSION_PROPERTY: + seafile_repo_set_enc_version (self, g_value_get_int (value)); + break; + case SEAFILE_REPO_RANDOM_KEY_PROPERTY: + seafile_repo_set_random_key (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_SALT_PROPERTY: + seafile_repo_set_salt (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_WORKTREE_PROPERTY: + seafile_repo_set_worktree (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_RELAY_ID_PROPERTY: + seafile_repo_set_relay_id (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_LAST_SYNC_TIME_PROPERTY: + seafile_repo_set_last_sync_time (self, g_value_get_int (value)); + break; + case SEAFILE_REPO_AUTO_SYNC_PROPERTY: + seafile_repo_set_auto_sync (self, g_value_get_boolean (value)); + break; + case SEAFILE_REPO_WORKTREE_INVALID_PROPERTY: + seafile_repo_set_worktree_invalid (self, g_value_get_boolean (value)); + break; + case SEAFILE_REPO_IS_VIRTUAL_PROPERTY: + seafile_repo_set_is_virtual (self, g_value_get_boolean (value)); + break; + case SEAFILE_REPO_ORIGIN_REPO_ID_PROPERTY: + seafile_repo_set_origin_repo_id (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_ORIGIN_REPO_NAME_PROPERTY: + seafile_repo_set_origin_repo_name (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_ORIGIN_PATH_PROPERTY: + seafile_repo_set_origin_path (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_IS_ORIGINAL_OWNER_PROPERTY: + seafile_repo_set_is_original_owner (self, g_value_get_boolean (value)); + break; + case SEAFILE_REPO_VIRTUAL_PERM_PROPERTY: + seafile_repo_set_virtual_perm (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_STORE_ID_PROPERTY: + seafile_repo_set_store_id (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_IS_CORRUPTED_PROPERTY: + seafile_repo_set_is_corrupted (self, g_value_get_boolean (value)); + break; + case SEAFILE_REPO_REPAIRED_PROPERTY: + seafile_repo_set_repaired (self, g_value_get_boolean (value)); + break; + case SEAFILE_REPO_SHARE_TYPE_PROPERTY: + seafile_repo_set_share_type (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_PERMISSION_PROPERTY: + seafile_repo_set_permission (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_USER_PROPERTY: + seafile_repo_set_user (self, g_value_get_string (value)); + break; + case SEAFILE_REPO_GROUP_ID_PROPERTY: + seafile_repo_set_group_id (self, g_value_get_int (value)); + break; + case SEAFILE_REPO_IS_SHARED_PROPERTY: + seafile_repo_set_is_shared (self, g_value_get_boolean (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static inline gpointer +seafile_sync_task_get_instance_private (SeafileSyncTask* self) +{ + return G_STRUCT_MEMBER_P (self, SeafileSyncTask_private_offset); +} + +SeafileSyncTask* +seafile_sync_task_construct (GType object_type) +{ + SeafileSyncTask * self = NULL; + self = (SeafileSyncTask*) g_object_new (object_type, NULL); + return self; +} + +SeafileSyncTask* +seafile_sync_task_new (void) +{ + return seafile_sync_task_construct (SEAFILE_TYPE_SYNC_TASK); +} + +gboolean +seafile_sync_task_get_force_upload (SeafileSyncTask* self) +{ + gboolean result; + g_return_val_if_fail (self != NULL, FALSE); + result = self->priv->_force_upload; + return result; +} + +void +seafile_sync_task_set_force_upload (SeafileSyncTask* self, + gboolean value) +{ + g_return_if_fail (self != NULL); + if (seafile_sync_task_get_force_upload (self) != value) { + self->priv->_force_upload = value; + g_object_notify_by_pspec ((GObject *) self, seafile_sync_task_properties[SEAFILE_SYNC_TASK_FORCE_UPLOAD_PROPERTY]); + } +} + +const gchar* +seafile_sync_task_get_repo_id (SeafileSyncTask* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_repo_id; + result = _tmp0_; + return result; +} + +void +seafile_sync_task_set_repo_id (SeafileSyncTask* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_sync_task_get_repo_id (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_repo_id); + self->priv->_repo_id = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_sync_task_properties[SEAFILE_SYNC_TASK_REPO_ID_PROPERTY]); + } +} + +const gchar* +seafile_sync_task_get_state (SeafileSyncTask* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_state; + result = _tmp0_; + return result; +} + +void +seafile_sync_task_set_state (SeafileSyncTask* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_sync_task_get_state (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_state); + self->priv->_state = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_sync_task_properties[SEAFILE_SYNC_TASK_STATE_PROPERTY]); + } +} + +gint +seafile_sync_task_get_error (SeafileSyncTask* self) +{ + gint result; + g_return_val_if_fail (self != NULL, 0); + result = self->priv->_error; + return result; +} + +void +seafile_sync_task_set_error (SeafileSyncTask* self, + gint value) +{ + g_return_if_fail (self != NULL); + if (seafile_sync_task_get_error (self) != value) { + self->priv->_error = value; + g_object_notify_by_pspec ((GObject *) self, seafile_sync_task_properties[SEAFILE_SYNC_TASK_ERROR_PROPERTY]); + } +} + +static void +seafile_sync_task_class_init (SeafileSyncTaskClass * klass, + gpointer klass_data) +{ + seafile_sync_task_parent_class = g_type_class_peek_parent (klass); + g_type_class_adjust_private_offset (klass, &SeafileSyncTask_private_offset); + G_OBJECT_CLASS (klass)->get_property = _vala_seafile_sync_task_get_property; + G_OBJECT_CLASS (klass)->set_property = _vala_seafile_sync_task_set_property; + G_OBJECT_CLASS (klass)->finalize = seafile_sync_task_finalize; + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_SYNC_TASK_FORCE_UPLOAD_PROPERTY, seafile_sync_task_properties[SEAFILE_SYNC_TASK_FORCE_UPLOAD_PROPERTY] = g_param_spec_boolean ("force-upload", "force-upload", "force-upload", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_SYNC_TASK_REPO_ID_PROPERTY, seafile_sync_task_properties[SEAFILE_SYNC_TASK_REPO_ID_PROPERTY] = g_param_spec_string ("repo-id", "repo-id", "repo-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_SYNC_TASK_STATE_PROPERTY, seafile_sync_task_properties[SEAFILE_SYNC_TASK_STATE_PROPERTY] = g_param_spec_string ("state", "state", "state", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_SYNC_TASK_ERROR_PROPERTY, seafile_sync_task_properties[SEAFILE_SYNC_TASK_ERROR_PROPERTY] = g_param_spec_int ("error", "error", "error", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +} + +static void +seafile_sync_task_instance_init (SeafileSyncTask * self, + gpointer klass) +{ + self->priv = seafile_sync_task_get_instance_private (self); +} + +static void +seafile_sync_task_finalize (GObject * obj) +{ + SeafileSyncTask * self; + self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEAFILE_TYPE_SYNC_TASK, SeafileSyncTask); + _g_free0 (self->priv->_repo_id); + _g_free0 (self->priv->_state); + G_OBJECT_CLASS (seafile_sync_task_parent_class)->finalize (obj); +} + +GType +seafile_sync_task_get_type (void) +{ + static volatile gsize seafile_sync_task_type_id__volatile = 0; + if (g_once_init_enter (&seafile_sync_task_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (SeafileSyncTaskClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) seafile_sync_task_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeafileSyncTask), 0, (GInstanceInitFunc) seafile_sync_task_instance_init, NULL }; + GType seafile_sync_task_type_id; + seafile_sync_task_type_id = g_type_register_static (G_TYPE_OBJECT, "SeafileSyncTask", &g_define_type_info, 0); + SeafileSyncTask_private_offset = g_type_add_instance_private (seafile_sync_task_type_id, sizeof (SeafileSyncTaskPrivate)); + g_once_init_leave (&seafile_sync_task_type_id__volatile, seafile_sync_task_type_id); + } + return seafile_sync_task_type_id__volatile; +} + +static void +_vala_seafile_sync_task_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + SeafileSyncTask * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_SYNC_TASK, SeafileSyncTask); + switch (property_id) { + case SEAFILE_SYNC_TASK_FORCE_UPLOAD_PROPERTY: + g_value_set_boolean (value, seafile_sync_task_get_force_upload (self)); + break; + case SEAFILE_SYNC_TASK_REPO_ID_PROPERTY: + g_value_set_string (value, seafile_sync_task_get_repo_id (self)); + break; + case SEAFILE_SYNC_TASK_STATE_PROPERTY: + g_value_set_string (value, seafile_sync_task_get_state (self)); + break; + case SEAFILE_SYNC_TASK_ERROR_PROPERTY: + g_value_set_int (value, seafile_sync_task_get_error (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +_vala_seafile_sync_task_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + SeafileSyncTask * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_SYNC_TASK, SeafileSyncTask); + switch (property_id) { + case SEAFILE_SYNC_TASK_FORCE_UPLOAD_PROPERTY: + seafile_sync_task_set_force_upload (self, g_value_get_boolean (value)); + break; + case SEAFILE_SYNC_TASK_REPO_ID_PROPERTY: + seafile_sync_task_set_repo_id (self, g_value_get_string (value)); + break; + case SEAFILE_SYNC_TASK_STATE_PROPERTY: + seafile_sync_task_set_state (self, g_value_get_string (value)); + break; + case SEAFILE_SYNC_TASK_ERROR_PROPERTY: + seafile_sync_task_set_error (self, g_value_get_int (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static inline gpointer +seafile_session_info_get_instance_private (SeafileSessionInfo* self) +{ + return G_STRUCT_MEMBER_P (self, SeafileSessionInfo_private_offset); +} + +SeafileSessionInfo* +seafile_session_info_construct (GType object_type) +{ + SeafileSessionInfo * self = NULL; + self = (SeafileSessionInfo*) g_object_new (object_type, NULL); + return self; +} + +SeafileSessionInfo* +seafile_session_info_new (void) +{ + return seafile_session_info_construct (SEAFILE_TYPE_SESSION_INFO); +} + +const gchar* +seafile_session_info_get_datadir (SeafileSessionInfo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_datadir; + result = _tmp0_; + return result; +} + +void +seafile_session_info_set_datadir (SeafileSessionInfo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_session_info_get_datadir (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_datadir); + self->priv->_datadir = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_session_info_properties[SEAFILE_SESSION_INFO_DATADIR_PROPERTY]); + } +} + +static void +seafile_session_info_class_init (SeafileSessionInfoClass * klass, + gpointer klass_data) +{ + seafile_session_info_parent_class = g_type_class_peek_parent (klass); + g_type_class_adjust_private_offset (klass, &SeafileSessionInfo_private_offset); + G_OBJECT_CLASS (klass)->get_property = _vala_seafile_session_info_get_property; + G_OBJECT_CLASS (klass)->set_property = _vala_seafile_session_info_set_property; + G_OBJECT_CLASS (klass)->finalize = seafile_session_info_finalize; + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_SESSION_INFO_DATADIR_PROPERTY, seafile_session_info_properties[SEAFILE_SESSION_INFO_DATADIR_PROPERTY] = g_param_spec_string ("datadir", "datadir", "datadir", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +} + +static void +seafile_session_info_instance_init (SeafileSessionInfo * self, + gpointer klass) +{ + self->priv = seafile_session_info_get_instance_private (self); +} + +static void +seafile_session_info_finalize (GObject * obj) +{ + SeafileSessionInfo * self; + self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEAFILE_TYPE_SESSION_INFO, SeafileSessionInfo); + _g_free0 (self->priv->_datadir); + G_OBJECT_CLASS (seafile_session_info_parent_class)->finalize (obj); +} + +GType +seafile_session_info_get_type (void) +{ + static volatile gsize seafile_session_info_type_id__volatile = 0; + if (g_once_init_enter (&seafile_session_info_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (SeafileSessionInfoClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) seafile_session_info_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeafileSessionInfo), 0, (GInstanceInitFunc) seafile_session_info_instance_init, NULL }; + GType seafile_session_info_type_id; + seafile_session_info_type_id = g_type_register_static (G_TYPE_OBJECT, "SeafileSessionInfo", &g_define_type_info, 0); + SeafileSessionInfo_private_offset = g_type_add_instance_private (seafile_session_info_type_id, sizeof (SeafileSessionInfoPrivate)); + g_once_init_leave (&seafile_session_info_type_id__volatile, seafile_session_info_type_id); + } + return seafile_session_info_type_id__volatile; +} + +static void +_vala_seafile_session_info_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + SeafileSessionInfo * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_SESSION_INFO, SeafileSessionInfo); + switch (property_id) { + case SEAFILE_SESSION_INFO_DATADIR_PROPERTY: + g_value_set_string (value, seafile_session_info_get_datadir (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +_vala_seafile_session_info_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + SeafileSessionInfo * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_SESSION_INFO, SeafileSessionInfo); + switch (property_id) { + case SEAFILE_SESSION_INFO_DATADIR_PROPERTY: + seafile_session_info_set_datadir (self, g_value_get_string (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static inline gpointer +seafile_diff_entry_get_instance_private (SeafileDiffEntry* self) +{ + return G_STRUCT_MEMBER_P (self, SeafileDiffEntry_private_offset); +} + +SeafileDiffEntry* +seafile_diff_entry_construct (GType object_type) +{ + SeafileDiffEntry * self = NULL; + self = (SeafileDiffEntry*) g_object_new (object_type, NULL); + return self; +} + +SeafileDiffEntry* +seafile_diff_entry_new (void) +{ + return seafile_diff_entry_construct (SEAFILE_TYPE_DIFF_ENTRY); +} + +const gchar* +seafile_diff_entry_get_status (SeafileDiffEntry* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_status; + result = _tmp0_; + return result; +} + +void +seafile_diff_entry_set_status (SeafileDiffEntry* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_diff_entry_get_status (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_status); + self->priv->_status = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_diff_entry_properties[SEAFILE_DIFF_ENTRY_STATUS_PROPERTY]); + } +} + +const gchar* +seafile_diff_entry_get_name (SeafileDiffEntry* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_name; + result = _tmp0_; + return result; +} + +void +seafile_diff_entry_set_name (SeafileDiffEntry* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_diff_entry_get_name (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_name); + self->priv->_name = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_diff_entry_properties[SEAFILE_DIFF_ENTRY_NAME_PROPERTY]); + } +} + +const gchar* +seafile_diff_entry_get_new_name (SeafileDiffEntry* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_new_name; + result = _tmp0_; + return result; +} + +void +seafile_diff_entry_set_new_name (SeafileDiffEntry* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_diff_entry_get_new_name (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_new_name); + self->priv->_new_name = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_diff_entry_properties[SEAFILE_DIFF_ENTRY_NEW_NAME_PROPERTY]); + } +} + +static void +seafile_diff_entry_class_init (SeafileDiffEntryClass * klass, + gpointer klass_data) +{ + seafile_diff_entry_parent_class = g_type_class_peek_parent (klass); + g_type_class_adjust_private_offset (klass, &SeafileDiffEntry_private_offset); + G_OBJECT_CLASS (klass)->get_property = _vala_seafile_diff_entry_get_property; + G_OBJECT_CLASS (klass)->set_property = _vala_seafile_diff_entry_set_property; + G_OBJECT_CLASS (klass)->finalize = seafile_diff_entry_finalize; + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_DIFF_ENTRY_STATUS_PROPERTY, seafile_diff_entry_properties[SEAFILE_DIFF_ENTRY_STATUS_PROPERTY] = g_param_spec_string ("status", "status", "status", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_DIFF_ENTRY_NAME_PROPERTY, seafile_diff_entry_properties[SEAFILE_DIFF_ENTRY_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_DIFF_ENTRY_NEW_NAME_PROPERTY, seafile_diff_entry_properties[SEAFILE_DIFF_ENTRY_NEW_NAME_PROPERTY] = g_param_spec_string ("new-name", "new-name", "new-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +} + +static void +seafile_diff_entry_instance_init (SeafileDiffEntry * self, + gpointer klass) +{ + self->priv = seafile_diff_entry_get_instance_private (self); +} + +static void +seafile_diff_entry_finalize (GObject * obj) +{ + SeafileDiffEntry * self; + self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEAFILE_TYPE_DIFF_ENTRY, SeafileDiffEntry); + _g_free0 (self->priv->_status); + _g_free0 (self->priv->_name); + _g_free0 (self->priv->_new_name); + G_OBJECT_CLASS (seafile_diff_entry_parent_class)->finalize (obj); +} + +GType +seafile_diff_entry_get_type (void) +{ + static volatile gsize seafile_diff_entry_type_id__volatile = 0; + if (g_once_init_enter (&seafile_diff_entry_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (SeafileDiffEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) seafile_diff_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeafileDiffEntry), 0, (GInstanceInitFunc) seafile_diff_entry_instance_init, NULL }; + GType seafile_diff_entry_type_id; + seafile_diff_entry_type_id = g_type_register_static (G_TYPE_OBJECT, "SeafileDiffEntry", &g_define_type_info, 0); + SeafileDiffEntry_private_offset = g_type_add_instance_private (seafile_diff_entry_type_id, sizeof (SeafileDiffEntryPrivate)); + g_once_init_leave (&seafile_diff_entry_type_id__volatile, seafile_diff_entry_type_id); + } + return seafile_diff_entry_type_id__volatile; +} + +static void +_vala_seafile_diff_entry_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + SeafileDiffEntry * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_DIFF_ENTRY, SeafileDiffEntry); + switch (property_id) { + case SEAFILE_DIFF_ENTRY_STATUS_PROPERTY: + g_value_set_string (value, seafile_diff_entry_get_status (self)); + break; + case SEAFILE_DIFF_ENTRY_NAME_PROPERTY: + g_value_set_string (value, seafile_diff_entry_get_name (self)); + break; + case SEAFILE_DIFF_ENTRY_NEW_NAME_PROPERTY: + g_value_set_string (value, seafile_diff_entry_get_new_name (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +_vala_seafile_diff_entry_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + SeafileDiffEntry * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_DIFF_ENTRY, SeafileDiffEntry); + switch (property_id) { + case SEAFILE_DIFF_ENTRY_STATUS_PROPERTY: + seafile_diff_entry_set_status (self, g_value_get_string (value)); + break; + case SEAFILE_DIFF_ENTRY_NAME_PROPERTY: + seafile_diff_entry_set_name (self, g_value_get_string (value)); + break; + case SEAFILE_DIFF_ENTRY_NEW_NAME_PROPERTY: + seafile_diff_entry_set_new_name (self, g_value_get_string (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static inline gpointer +seafile_encryption_info_get_instance_private (SeafileEncryptionInfo* self) +{ + return G_STRUCT_MEMBER_P (self, SeafileEncryptionInfo_private_offset); +} + +SeafileEncryptionInfo* +seafile_encryption_info_construct (GType object_type) +{ + SeafileEncryptionInfo * self = NULL; + self = (SeafileEncryptionInfo*) g_object_new (object_type, NULL); + return self; +} + +SeafileEncryptionInfo* +seafile_encryption_info_new (void) +{ + return seafile_encryption_info_construct (SEAFILE_TYPE_ENCRYPTION_INFO); +} + +const gchar* +seafile_encryption_info_get_repo_id (SeafileEncryptionInfo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_repo_id; + result = _tmp0_; + return result; +} + +void +seafile_encryption_info_set_repo_id (SeafileEncryptionInfo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_encryption_info_get_repo_id (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_repo_id); + self->priv->_repo_id = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_encryption_info_properties[SEAFILE_ENCRYPTION_INFO_REPO_ID_PROPERTY]); + } +} + +const gchar* +seafile_encryption_info_get_passwd (SeafileEncryptionInfo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_passwd; + result = _tmp0_; + return result; +} + +void +seafile_encryption_info_set_passwd (SeafileEncryptionInfo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_encryption_info_get_passwd (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_passwd); + self->priv->_passwd = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_encryption_info_properties[SEAFILE_ENCRYPTION_INFO_PASSWD_PROPERTY]); + } +} + +gint +seafile_encryption_info_get_enc_version (SeafileEncryptionInfo* self) +{ + gint result; + g_return_val_if_fail (self != NULL, 0); + result = self->priv->_enc_version; + return result; +} + +void +seafile_encryption_info_set_enc_version (SeafileEncryptionInfo* self, + gint value) +{ + g_return_if_fail (self != NULL); + if (seafile_encryption_info_get_enc_version (self) != value) { + self->priv->_enc_version = value; + g_object_notify_by_pspec ((GObject *) self, seafile_encryption_info_properties[SEAFILE_ENCRYPTION_INFO_ENC_VERSION_PROPERTY]); + } +} + +const gchar* +seafile_encryption_info_get_magic (SeafileEncryptionInfo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_magic; + result = _tmp0_; + return result; +} + +void +seafile_encryption_info_set_magic (SeafileEncryptionInfo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_encryption_info_get_magic (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_magic); + self->priv->_magic = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_encryption_info_properties[SEAFILE_ENCRYPTION_INFO_MAGIC_PROPERTY]); + } +} + +const gchar* +seafile_encryption_info_get_random_key (SeafileEncryptionInfo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_random_key; + result = _tmp0_; + return result; +} + +void +seafile_encryption_info_set_random_key (SeafileEncryptionInfo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_encryption_info_get_random_key (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_random_key); + self->priv->_random_key = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_encryption_info_properties[SEAFILE_ENCRYPTION_INFO_RANDOM_KEY_PROPERTY]); + } +} + +const gchar* +seafile_encryption_info_get_salt (SeafileEncryptionInfo* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_salt; + result = _tmp0_; + return result; +} + +void +seafile_encryption_info_set_salt (SeafileEncryptionInfo* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_encryption_info_get_salt (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_salt); + self->priv->_salt = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_encryption_info_properties[SEAFILE_ENCRYPTION_INFO_SALT_PROPERTY]); + } +} + +static void +seafile_encryption_info_class_init (SeafileEncryptionInfoClass * klass, + gpointer klass_data) +{ + seafile_encryption_info_parent_class = g_type_class_peek_parent (klass); + g_type_class_adjust_private_offset (klass, &SeafileEncryptionInfo_private_offset); + G_OBJECT_CLASS (klass)->get_property = _vala_seafile_encryption_info_get_property; + G_OBJECT_CLASS (klass)->set_property = _vala_seafile_encryption_info_set_property; + G_OBJECT_CLASS (klass)->finalize = seafile_encryption_info_finalize; + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_ENCRYPTION_INFO_REPO_ID_PROPERTY, seafile_encryption_info_properties[SEAFILE_ENCRYPTION_INFO_REPO_ID_PROPERTY] = g_param_spec_string ("repo-id", "repo-id", "repo-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_ENCRYPTION_INFO_PASSWD_PROPERTY, seafile_encryption_info_properties[SEAFILE_ENCRYPTION_INFO_PASSWD_PROPERTY] = g_param_spec_string ("passwd", "passwd", "passwd", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_ENCRYPTION_INFO_ENC_VERSION_PROPERTY, seafile_encryption_info_properties[SEAFILE_ENCRYPTION_INFO_ENC_VERSION_PROPERTY] = g_param_spec_int ("enc-version", "enc-version", "enc-version", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_ENCRYPTION_INFO_MAGIC_PROPERTY, seafile_encryption_info_properties[SEAFILE_ENCRYPTION_INFO_MAGIC_PROPERTY] = g_param_spec_string ("magic", "magic", "magic", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_ENCRYPTION_INFO_RANDOM_KEY_PROPERTY, seafile_encryption_info_properties[SEAFILE_ENCRYPTION_INFO_RANDOM_KEY_PROPERTY] = g_param_spec_string ("random-key", "random-key", "random-key", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_ENCRYPTION_INFO_SALT_PROPERTY, seafile_encryption_info_properties[SEAFILE_ENCRYPTION_INFO_SALT_PROPERTY] = g_param_spec_string ("salt", "salt", "salt", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +} + +static void +seafile_encryption_info_instance_init (SeafileEncryptionInfo * self, + gpointer klass) +{ + self->priv = seafile_encryption_info_get_instance_private (self); +} + +static void +seafile_encryption_info_finalize (GObject * obj) +{ + SeafileEncryptionInfo * self; + self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEAFILE_TYPE_ENCRYPTION_INFO, SeafileEncryptionInfo); + _g_free0 (self->priv->_repo_id); + _g_free0 (self->priv->_passwd); + _g_free0 (self->priv->_magic); + _g_free0 (self->priv->_random_key); + _g_free0 (self->priv->_salt); + G_OBJECT_CLASS (seafile_encryption_info_parent_class)->finalize (obj); +} + +GType +seafile_encryption_info_get_type (void) +{ + static volatile gsize seafile_encryption_info_type_id__volatile = 0; + if (g_once_init_enter (&seafile_encryption_info_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (SeafileEncryptionInfoClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) seafile_encryption_info_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeafileEncryptionInfo), 0, (GInstanceInitFunc) seafile_encryption_info_instance_init, NULL }; + GType seafile_encryption_info_type_id; + seafile_encryption_info_type_id = g_type_register_static (G_TYPE_OBJECT, "SeafileEncryptionInfo", &g_define_type_info, 0); + SeafileEncryptionInfo_private_offset = g_type_add_instance_private (seafile_encryption_info_type_id, sizeof (SeafileEncryptionInfoPrivate)); + g_once_init_leave (&seafile_encryption_info_type_id__volatile, seafile_encryption_info_type_id); + } + return seafile_encryption_info_type_id__volatile; +} + +static void +_vala_seafile_encryption_info_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + SeafileEncryptionInfo * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_ENCRYPTION_INFO, SeafileEncryptionInfo); + switch (property_id) { + case SEAFILE_ENCRYPTION_INFO_REPO_ID_PROPERTY: + g_value_set_string (value, seafile_encryption_info_get_repo_id (self)); + break; + case SEAFILE_ENCRYPTION_INFO_PASSWD_PROPERTY: + g_value_set_string (value, seafile_encryption_info_get_passwd (self)); + break; + case SEAFILE_ENCRYPTION_INFO_ENC_VERSION_PROPERTY: + g_value_set_int (value, seafile_encryption_info_get_enc_version (self)); + break; + case SEAFILE_ENCRYPTION_INFO_MAGIC_PROPERTY: + g_value_set_string (value, seafile_encryption_info_get_magic (self)); + break; + case SEAFILE_ENCRYPTION_INFO_RANDOM_KEY_PROPERTY: + g_value_set_string (value, seafile_encryption_info_get_random_key (self)); + break; + case SEAFILE_ENCRYPTION_INFO_SALT_PROPERTY: + g_value_set_string (value, seafile_encryption_info_get_salt (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +_vala_seafile_encryption_info_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + SeafileEncryptionInfo * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_ENCRYPTION_INFO, SeafileEncryptionInfo); + switch (property_id) { + case SEAFILE_ENCRYPTION_INFO_REPO_ID_PROPERTY: + seafile_encryption_info_set_repo_id (self, g_value_get_string (value)); + break; + case SEAFILE_ENCRYPTION_INFO_PASSWD_PROPERTY: + seafile_encryption_info_set_passwd (self, g_value_get_string (value)); + break; + case SEAFILE_ENCRYPTION_INFO_ENC_VERSION_PROPERTY: + seafile_encryption_info_set_enc_version (self, g_value_get_int (value)); + break; + case SEAFILE_ENCRYPTION_INFO_MAGIC_PROPERTY: + seafile_encryption_info_set_magic (self, g_value_get_string (value)); + break; + case SEAFILE_ENCRYPTION_INFO_RANDOM_KEY_PROPERTY: + seafile_encryption_info_set_random_key (self, g_value_get_string (value)); + break; + case SEAFILE_ENCRYPTION_INFO_SALT_PROPERTY: + seafile_encryption_info_set_salt (self, g_value_get_string (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static inline gpointer +seafile_file_sync_error_get_instance_private (SeafileFileSyncError* self) +{ + return G_STRUCT_MEMBER_P (self, SeafileFileSyncError_private_offset); +} + +SeafileFileSyncError* +seafile_file_sync_error_construct (GType object_type) +{ + SeafileFileSyncError * self = NULL; + self = (SeafileFileSyncError*) g_object_new (object_type, NULL); + return self; +} + +SeafileFileSyncError* +seafile_file_sync_error_new (void) +{ + return seafile_file_sync_error_construct (SEAFILE_TYPE_FILE_SYNC_ERROR); +} + +gint +seafile_file_sync_error_get_id (SeafileFileSyncError* self) +{ + gint result; + g_return_val_if_fail (self != NULL, 0); + result = self->priv->_id; + return result; +} + +void +seafile_file_sync_error_set_id (SeafileFileSyncError* self, + gint value) +{ + g_return_if_fail (self != NULL); + if (seafile_file_sync_error_get_id (self) != value) { + self->priv->_id = value; + g_object_notify_by_pspec ((GObject *) self, seafile_file_sync_error_properties[SEAFILE_FILE_SYNC_ERROR_ID_PROPERTY]); + } +} + +const gchar* +seafile_file_sync_error_get_repo_id (SeafileFileSyncError* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_repo_id; + result = _tmp0_; + return result; +} + +void +seafile_file_sync_error_set_repo_id (SeafileFileSyncError* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_file_sync_error_get_repo_id (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_repo_id); + self->priv->_repo_id = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_file_sync_error_properties[SEAFILE_FILE_SYNC_ERROR_REPO_ID_PROPERTY]); + } +} + +const gchar* +seafile_file_sync_error_get_repo_name (SeafileFileSyncError* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_repo_name; + result = _tmp0_; + return result; +} + +void +seafile_file_sync_error_set_repo_name (SeafileFileSyncError* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_file_sync_error_get_repo_name (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_repo_name); + self->priv->_repo_name = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_file_sync_error_properties[SEAFILE_FILE_SYNC_ERROR_REPO_NAME_PROPERTY]); + } +} + +const gchar* +seafile_file_sync_error_get_path (SeafileFileSyncError* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_path; + result = _tmp0_; + return result; +} + +void +seafile_file_sync_error_set_path (SeafileFileSyncError* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_file_sync_error_get_path (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_path); + self->priv->_path = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_file_sync_error_properties[SEAFILE_FILE_SYNC_ERROR_PATH_PROPERTY]); + } +} + +gint +seafile_file_sync_error_get_err_id (SeafileFileSyncError* self) +{ + gint result; + g_return_val_if_fail (self != NULL, 0); + result = self->priv->_err_id; + return result; +} + +void +seafile_file_sync_error_set_err_id (SeafileFileSyncError* self, + gint value) +{ + g_return_if_fail (self != NULL); + if (seafile_file_sync_error_get_err_id (self) != value) { + self->priv->_err_id = value; + g_object_notify_by_pspec ((GObject *) self, seafile_file_sync_error_properties[SEAFILE_FILE_SYNC_ERROR_ERR_ID_PROPERTY]); + } +} + +gint64 +seafile_file_sync_error_get_timestamp (SeafileFileSyncError* self) +{ + gint64 result; + g_return_val_if_fail (self != NULL, 0LL); + result = self->priv->_timestamp; + return result; +} + +void +seafile_file_sync_error_set_timestamp (SeafileFileSyncError* self, + gint64 value) +{ + g_return_if_fail (self != NULL); + if (seafile_file_sync_error_get_timestamp (self) != value) { + self->priv->_timestamp = value; + g_object_notify_by_pspec ((GObject *) self, seafile_file_sync_error_properties[SEAFILE_FILE_SYNC_ERROR_TIMESTAMP_PROPERTY]); + } +} + +static void +seafile_file_sync_error_class_init (SeafileFileSyncErrorClass * klass, + gpointer klass_data) +{ + seafile_file_sync_error_parent_class = g_type_class_peek_parent (klass); + g_type_class_adjust_private_offset (klass, &SeafileFileSyncError_private_offset); + G_OBJECT_CLASS (klass)->get_property = _vala_seafile_file_sync_error_get_property; + G_OBJECT_CLASS (klass)->set_property = _vala_seafile_file_sync_error_set_property; + G_OBJECT_CLASS (klass)->finalize = seafile_file_sync_error_finalize; + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_FILE_SYNC_ERROR_ID_PROPERTY, seafile_file_sync_error_properties[SEAFILE_FILE_SYNC_ERROR_ID_PROPERTY] = g_param_spec_int ("id", "id", "id", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_FILE_SYNC_ERROR_REPO_ID_PROPERTY, seafile_file_sync_error_properties[SEAFILE_FILE_SYNC_ERROR_REPO_ID_PROPERTY] = g_param_spec_string ("repo-id", "repo-id", "repo-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_FILE_SYNC_ERROR_REPO_NAME_PROPERTY, seafile_file_sync_error_properties[SEAFILE_FILE_SYNC_ERROR_REPO_NAME_PROPERTY] = g_param_spec_string ("repo-name", "repo-name", "repo-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_FILE_SYNC_ERROR_PATH_PROPERTY, seafile_file_sync_error_properties[SEAFILE_FILE_SYNC_ERROR_PATH_PROPERTY] = g_param_spec_string ("path", "path", "path", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_FILE_SYNC_ERROR_ERR_ID_PROPERTY, seafile_file_sync_error_properties[SEAFILE_FILE_SYNC_ERROR_ERR_ID_PROPERTY] = g_param_spec_int ("err-id", "err-id", "err-id", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_FILE_SYNC_ERROR_TIMESTAMP_PROPERTY, seafile_file_sync_error_properties[SEAFILE_FILE_SYNC_ERROR_TIMESTAMP_PROPERTY] = g_param_spec_int64 ("timestamp", "timestamp", "timestamp", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +} + +static void +seafile_file_sync_error_instance_init (SeafileFileSyncError * self, + gpointer klass) +{ + self->priv = seafile_file_sync_error_get_instance_private (self); +} + +static void +seafile_file_sync_error_finalize (GObject * obj) +{ + SeafileFileSyncError * self; + self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEAFILE_TYPE_FILE_SYNC_ERROR, SeafileFileSyncError); + _g_free0 (self->priv->_repo_id); + _g_free0 (self->priv->_repo_name); + _g_free0 (self->priv->_path); + G_OBJECT_CLASS (seafile_file_sync_error_parent_class)->finalize (obj); +} + +GType +seafile_file_sync_error_get_type (void) +{ + static volatile gsize seafile_file_sync_error_type_id__volatile = 0; + if (g_once_init_enter (&seafile_file_sync_error_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (SeafileFileSyncErrorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) seafile_file_sync_error_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeafileFileSyncError), 0, (GInstanceInitFunc) seafile_file_sync_error_instance_init, NULL }; + GType seafile_file_sync_error_type_id; + seafile_file_sync_error_type_id = g_type_register_static (G_TYPE_OBJECT, "SeafileFileSyncError", &g_define_type_info, 0); + SeafileFileSyncError_private_offset = g_type_add_instance_private (seafile_file_sync_error_type_id, sizeof (SeafileFileSyncErrorPrivate)); + g_once_init_leave (&seafile_file_sync_error_type_id__volatile, seafile_file_sync_error_type_id); + } + return seafile_file_sync_error_type_id__volatile; +} + +static void +_vala_seafile_file_sync_error_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + SeafileFileSyncError * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_FILE_SYNC_ERROR, SeafileFileSyncError); + switch (property_id) { + case SEAFILE_FILE_SYNC_ERROR_ID_PROPERTY: + g_value_set_int (value, seafile_file_sync_error_get_id (self)); + break; + case SEAFILE_FILE_SYNC_ERROR_REPO_ID_PROPERTY: + g_value_set_string (value, seafile_file_sync_error_get_repo_id (self)); + break; + case SEAFILE_FILE_SYNC_ERROR_REPO_NAME_PROPERTY: + g_value_set_string (value, seafile_file_sync_error_get_repo_name (self)); + break; + case SEAFILE_FILE_SYNC_ERROR_PATH_PROPERTY: + g_value_set_string (value, seafile_file_sync_error_get_path (self)); + break; + case SEAFILE_FILE_SYNC_ERROR_ERR_ID_PROPERTY: + g_value_set_int (value, seafile_file_sync_error_get_err_id (self)); + break; + case SEAFILE_FILE_SYNC_ERROR_TIMESTAMP_PROPERTY: + g_value_set_int64 (value, seafile_file_sync_error_get_timestamp (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +_vala_seafile_file_sync_error_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + SeafileFileSyncError * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_FILE_SYNC_ERROR, SeafileFileSyncError); + switch (property_id) { + case SEAFILE_FILE_SYNC_ERROR_ID_PROPERTY: + seafile_file_sync_error_set_id (self, g_value_get_int (value)); + break; + case SEAFILE_FILE_SYNC_ERROR_REPO_ID_PROPERTY: + seafile_file_sync_error_set_repo_id (self, g_value_get_string (value)); + break; + case SEAFILE_FILE_SYNC_ERROR_REPO_NAME_PROPERTY: + seafile_file_sync_error_set_repo_name (self, g_value_get_string (value)); + break; + case SEAFILE_FILE_SYNC_ERROR_PATH_PROPERTY: + seafile_file_sync_error_set_path (self, g_value_get_string (value)); + break; + case SEAFILE_FILE_SYNC_ERROR_ERR_ID_PROPERTY: + seafile_file_sync_error_set_err_id (self, g_value_get_int (value)); + break; + case SEAFILE_FILE_SYNC_ERROR_TIMESTAMP_PROPERTY: + seafile_file_sync_error_set_timestamp (self, g_value_get_int64 (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + diff --git a/lib/seafile-object.h b/lib/seafile-object.h new file mode 100644 index 00000000..da483ac3 --- /dev/null +++ b/lib/seafile-object.h @@ -0,0 +1,424 @@ +/* seafile-object.h generated by valac 0.46.5, the Vala compiler, do not modify */ + +#ifndef __SEAFILE_OBJECT_H__ +#define __SEAFILE_OBJECT_H__ + +#include +#include + +G_BEGIN_DECLS + +#define SEAFILE_TYPE_REPO (seafile_repo_get_type ()) +#define SEAFILE_REPO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_REPO, SeafileRepo)) +#define SEAFILE_REPO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_REPO, SeafileRepoClass)) +#define SEAFILE_IS_REPO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_REPO)) +#define SEAFILE_IS_REPO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_REPO)) +#define SEAFILE_REPO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_REPO, SeafileRepoClass)) + +typedef struct _SeafileRepo SeafileRepo; +typedef struct _SeafileRepoClass SeafileRepoClass; +typedef struct _SeafileRepoPrivate SeafileRepoPrivate; + +#define SEAFILE_TYPE_SYNC_TASK (seafile_sync_task_get_type ()) +#define SEAFILE_SYNC_TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_SYNC_TASK, SeafileSyncTask)) +#define SEAFILE_SYNC_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_SYNC_TASK, SeafileSyncTaskClass)) +#define SEAFILE_IS_SYNC_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_SYNC_TASK)) +#define SEAFILE_IS_SYNC_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_SYNC_TASK)) +#define SEAFILE_SYNC_TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_SYNC_TASK, SeafileSyncTaskClass)) + +typedef struct _SeafileSyncTask SeafileSyncTask; +typedef struct _SeafileSyncTaskClass SeafileSyncTaskClass; +typedef struct _SeafileSyncTaskPrivate SeafileSyncTaskPrivate; + +#define SEAFILE_TYPE_SESSION_INFO (seafile_session_info_get_type ()) +#define SEAFILE_SESSION_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_SESSION_INFO, SeafileSessionInfo)) +#define SEAFILE_SESSION_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_SESSION_INFO, SeafileSessionInfoClass)) +#define SEAFILE_IS_SESSION_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_SESSION_INFO)) +#define SEAFILE_IS_SESSION_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_SESSION_INFO)) +#define SEAFILE_SESSION_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_SESSION_INFO, SeafileSessionInfoClass)) + +typedef struct _SeafileSessionInfo SeafileSessionInfo; +typedef struct _SeafileSessionInfoClass SeafileSessionInfoClass; +typedef struct _SeafileSessionInfoPrivate SeafileSessionInfoPrivate; + +#define SEAFILE_TYPE_DIFF_ENTRY (seafile_diff_entry_get_type ()) +#define SEAFILE_DIFF_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_DIFF_ENTRY, SeafileDiffEntry)) +#define SEAFILE_DIFF_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_DIFF_ENTRY, SeafileDiffEntryClass)) +#define SEAFILE_IS_DIFF_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_DIFF_ENTRY)) +#define SEAFILE_IS_DIFF_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_DIFF_ENTRY)) +#define SEAFILE_DIFF_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_DIFF_ENTRY, SeafileDiffEntryClass)) + +typedef struct _SeafileDiffEntry SeafileDiffEntry; +typedef struct _SeafileDiffEntryClass SeafileDiffEntryClass; +typedef struct _SeafileDiffEntryPrivate SeafileDiffEntryPrivate; + +#define SEAFILE_TYPE_ENCRYPTION_INFO (seafile_encryption_info_get_type ()) +#define SEAFILE_ENCRYPTION_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_ENCRYPTION_INFO, SeafileEncryptionInfo)) +#define SEAFILE_ENCRYPTION_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_ENCRYPTION_INFO, SeafileEncryptionInfoClass)) +#define SEAFILE_IS_ENCRYPTION_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_ENCRYPTION_INFO)) +#define SEAFILE_IS_ENCRYPTION_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_ENCRYPTION_INFO)) +#define SEAFILE_ENCRYPTION_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_ENCRYPTION_INFO, SeafileEncryptionInfoClass)) + +typedef struct _SeafileEncryptionInfo SeafileEncryptionInfo; +typedef struct _SeafileEncryptionInfoClass SeafileEncryptionInfoClass; +typedef struct _SeafileEncryptionInfoPrivate SeafileEncryptionInfoPrivate; + +#define SEAFILE_TYPE_FILE_SYNC_ERROR (seafile_file_sync_error_get_type ()) +#define SEAFILE_FILE_SYNC_ERROR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_FILE_SYNC_ERROR, SeafileFileSyncError)) +#define SEAFILE_FILE_SYNC_ERROR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_FILE_SYNC_ERROR, SeafileFileSyncErrorClass)) +#define SEAFILE_IS_FILE_SYNC_ERROR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_FILE_SYNC_ERROR)) +#define SEAFILE_IS_FILE_SYNC_ERROR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_FILE_SYNC_ERROR)) +#define SEAFILE_FILE_SYNC_ERROR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_FILE_SYNC_ERROR, SeafileFileSyncErrorClass)) + +typedef struct _SeafileFileSyncError SeafileFileSyncError; +typedef struct _SeafileFileSyncErrorClass SeafileFileSyncErrorClass; +typedef struct _SeafileFileSyncErrorPrivate SeafileFileSyncErrorPrivate; + +#define SEAFILE_TYPE_TASK (seafile_task_get_type ()) +#define SEAFILE_TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_TASK, SeafileTask)) +#define SEAFILE_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_TASK, SeafileTaskClass)) +#define SEAFILE_IS_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_TASK)) +#define SEAFILE_IS_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_TASK)) +#define SEAFILE_TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_TASK, SeafileTaskClass)) + +typedef struct _SeafileTask SeafileTask; +typedef struct _SeafileTaskClass SeafileTaskClass; +typedef struct _SeafileTaskPrivate SeafileTaskPrivate; + +#define SEAFILE_TYPE_CLONE_TASK (seafile_clone_task_get_type ()) +#define SEAFILE_CLONE_TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_CLONE_TASK, SeafileCloneTask)) +#define SEAFILE_CLONE_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_CLONE_TASK, SeafileCloneTaskClass)) +#define SEAFILE_IS_CLONE_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_CLONE_TASK)) +#define SEAFILE_IS_CLONE_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_CLONE_TASK)) +#define SEAFILE_CLONE_TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_CLONE_TASK, SeafileCloneTaskClass)) + +typedef struct _SeafileCloneTask SeafileCloneTask; +typedef struct _SeafileCloneTaskClass SeafileCloneTaskClass; +typedef struct _SeafileCloneTaskPrivate SeafileCloneTaskPrivate; + +struct _SeafileRepo { + GObject parent_instance; + SeafileRepoPrivate * priv; + gchar _id[37]; + gchar* _name; + gchar* _desc; + gchar* _worktree; + gchar* _relay_id; +}; + +struct _SeafileRepoClass { + GObjectClass parent_class; +}; + +struct _SeafileSyncTask { + GObject parent_instance; + SeafileSyncTaskPrivate * priv; +}; + +struct _SeafileSyncTaskClass { + GObjectClass parent_class; +}; + +struct _SeafileSessionInfo { + GObject parent_instance; + SeafileSessionInfoPrivate * priv; +}; + +struct _SeafileSessionInfoClass { + GObjectClass parent_class; +}; + +struct _SeafileDiffEntry { + GObject parent_instance; + SeafileDiffEntryPrivate * priv; +}; + +struct _SeafileDiffEntryClass { + GObjectClass parent_class; +}; + +struct _SeafileEncryptionInfo { + GObject parent_instance; + SeafileEncryptionInfoPrivate * priv; +}; + +struct _SeafileEncryptionInfoClass { + GObjectClass parent_class; +}; + +struct _SeafileFileSyncError { + GObject parent_instance; + SeafileFileSyncErrorPrivate * priv; +}; + +struct _SeafileFileSyncErrorClass { + GObjectClass parent_class; +}; + +struct _SeafileTask { + GObject parent_instance; + SeafileTaskPrivate * priv; +}; + +struct _SeafileTaskClass { + GObjectClass parent_class; +}; + +struct _SeafileCloneTask { + GObject parent_instance; + SeafileCloneTaskPrivate * priv; +}; + +struct _SeafileCloneTaskClass { + GObjectClass parent_class; +}; + +GType seafile_repo_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileRepo, g_object_unref) +SeafileRepo* seafile_repo_new (void); +SeafileRepo* seafile_repo_construct (GType object_type); +const gchar* seafile_repo_get_id (SeafileRepo* self); +void seafile_repo_set_id (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_name (SeafileRepo* self); +void seafile_repo_set_name (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_desc (SeafileRepo* self); +void seafile_repo_set_desc (SeafileRepo* self, + const gchar* value); +gint seafile_repo_get_version (SeafileRepo* self); +void seafile_repo_set_version (SeafileRepo* self, + gint value); +gint seafile_repo_get_last_modify (SeafileRepo* self); +void seafile_repo_set_last_modify (SeafileRepo* self, + gint value); +gint64 seafile_repo_get_size (SeafileRepo* self); +void seafile_repo_set_size (SeafileRepo* self, + gint64 value); +gint64 seafile_repo_get_file_count (SeafileRepo* self); +void seafile_repo_set_file_count (SeafileRepo* self, + gint64 value); +const gchar* seafile_repo_get_head_cmmt_id (SeafileRepo* self); +void seafile_repo_set_head_cmmt_id (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_root (SeafileRepo* self); +void seafile_repo_set_root (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_repo_id (SeafileRepo* self); +void seafile_repo_set_repo_id (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_repo_name (SeafileRepo* self); +void seafile_repo_set_repo_name (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_repo_desc (SeafileRepo* self); +void seafile_repo_set_repo_desc (SeafileRepo* self, + const gchar* value); +gint seafile_repo_get_last_modified (SeafileRepo* self); +void seafile_repo_set_last_modified (SeafileRepo* self, + gint value); +gboolean seafile_repo_get_encrypted (SeafileRepo* self); +void seafile_repo_set_encrypted (SeafileRepo* self, + gboolean value); +const gchar* seafile_repo_get_magic (SeafileRepo* self); +void seafile_repo_set_magic (SeafileRepo* self, + const gchar* value); +gint seafile_repo_get_enc_version (SeafileRepo* self); +void seafile_repo_set_enc_version (SeafileRepo* self, + gint value); +const gchar* seafile_repo_get_random_key (SeafileRepo* self); +void seafile_repo_set_random_key (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_salt (SeafileRepo* self); +void seafile_repo_set_salt (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_worktree (SeafileRepo* self); +void seafile_repo_set_worktree (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_relay_id (SeafileRepo* self); +void seafile_repo_set_relay_id (SeafileRepo* self, + const gchar* value); +gint seafile_repo_get_last_sync_time (SeafileRepo* self); +void seafile_repo_set_last_sync_time (SeafileRepo* self, + gint value); +gboolean seafile_repo_get_auto_sync (SeafileRepo* self); +void seafile_repo_set_auto_sync (SeafileRepo* self, + gboolean value); +gboolean seafile_repo_get_worktree_invalid (SeafileRepo* self); +void seafile_repo_set_worktree_invalid (SeafileRepo* self, + gboolean value); +gboolean seafile_repo_get_is_virtual (SeafileRepo* self); +void seafile_repo_set_is_virtual (SeafileRepo* self, + gboolean value); +const gchar* seafile_repo_get_origin_repo_id (SeafileRepo* self); +void seafile_repo_set_origin_repo_id (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_origin_repo_name (SeafileRepo* self); +void seafile_repo_set_origin_repo_name (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_origin_path (SeafileRepo* self); +void seafile_repo_set_origin_path (SeafileRepo* self, + const gchar* value); +gboolean seafile_repo_get_is_original_owner (SeafileRepo* self); +void seafile_repo_set_is_original_owner (SeafileRepo* self, + gboolean value); +const gchar* seafile_repo_get_virtual_perm (SeafileRepo* self); +void seafile_repo_set_virtual_perm (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_store_id (SeafileRepo* self); +void seafile_repo_set_store_id (SeafileRepo* self, + const gchar* value); +gboolean seafile_repo_get_is_corrupted (SeafileRepo* self); +void seafile_repo_set_is_corrupted (SeafileRepo* self, + gboolean value); +gboolean seafile_repo_get_repaired (SeafileRepo* self); +void seafile_repo_set_repaired (SeafileRepo* self, + gboolean value); +const gchar* seafile_repo_get_share_type (SeafileRepo* self); +void seafile_repo_set_share_type (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_permission (SeafileRepo* self); +void seafile_repo_set_permission (SeafileRepo* self, + const gchar* value); +const gchar* seafile_repo_get_user (SeafileRepo* self); +void seafile_repo_set_user (SeafileRepo* self, + const gchar* value); +gint seafile_repo_get_group_id (SeafileRepo* self); +void seafile_repo_set_group_id (SeafileRepo* self, + gint value); +gboolean seafile_repo_get_is_shared (SeafileRepo* self); +void seafile_repo_set_is_shared (SeafileRepo* self, + gboolean value); +GType seafile_sync_task_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileSyncTask, g_object_unref) +SeafileSyncTask* seafile_sync_task_new (void); +SeafileSyncTask* seafile_sync_task_construct (GType object_type); +gboolean seafile_sync_task_get_force_upload (SeafileSyncTask* self); +void seafile_sync_task_set_force_upload (SeafileSyncTask* self, + gboolean value); +const gchar* seafile_sync_task_get_repo_id (SeafileSyncTask* self); +void seafile_sync_task_set_repo_id (SeafileSyncTask* self, + const gchar* value); +const gchar* seafile_sync_task_get_state (SeafileSyncTask* self); +void seafile_sync_task_set_state (SeafileSyncTask* self, + const gchar* value); +gint seafile_sync_task_get_error (SeafileSyncTask* self); +void seafile_sync_task_set_error (SeafileSyncTask* self, + gint value); +GType seafile_session_info_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileSessionInfo, g_object_unref) +SeafileSessionInfo* seafile_session_info_new (void); +SeafileSessionInfo* seafile_session_info_construct (GType object_type); +const gchar* seafile_session_info_get_datadir (SeafileSessionInfo* self); +void seafile_session_info_set_datadir (SeafileSessionInfo* self, + const gchar* value); +GType seafile_diff_entry_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileDiffEntry, g_object_unref) +SeafileDiffEntry* seafile_diff_entry_new (void); +SeafileDiffEntry* seafile_diff_entry_construct (GType object_type); +const gchar* seafile_diff_entry_get_status (SeafileDiffEntry* self); +void seafile_diff_entry_set_status (SeafileDiffEntry* self, + const gchar* value); +const gchar* seafile_diff_entry_get_name (SeafileDiffEntry* self); +void seafile_diff_entry_set_name (SeafileDiffEntry* self, + const gchar* value); +const gchar* seafile_diff_entry_get_new_name (SeafileDiffEntry* self); +void seafile_diff_entry_set_new_name (SeafileDiffEntry* self, + const gchar* value); +GType seafile_encryption_info_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileEncryptionInfo, g_object_unref) +SeafileEncryptionInfo* seafile_encryption_info_new (void); +SeafileEncryptionInfo* seafile_encryption_info_construct (GType object_type); +const gchar* seafile_encryption_info_get_repo_id (SeafileEncryptionInfo* self); +void seafile_encryption_info_set_repo_id (SeafileEncryptionInfo* self, + const gchar* value); +const gchar* seafile_encryption_info_get_passwd (SeafileEncryptionInfo* self); +void seafile_encryption_info_set_passwd (SeafileEncryptionInfo* self, + const gchar* value); +gint seafile_encryption_info_get_enc_version (SeafileEncryptionInfo* self); +void seafile_encryption_info_set_enc_version (SeafileEncryptionInfo* self, + gint value); +const gchar* seafile_encryption_info_get_magic (SeafileEncryptionInfo* self); +void seafile_encryption_info_set_magic (SeafileEncryptionInfo* self, + const gchar* value); +const gchar* seafile_encryption_info_get_random_key (SeafileEncryptionInfo* self); +void seafile_encryption_info_set_random_key (SeafileEncryptionInfo* self, + const gchar* value); +const gchar* seafile_encryption_info_get_salt (SeafileEncryptionInfo* self); +void seafile_encryption_info_set_salt (SeafileEncryptionInfo* self, + const gchar* value); +GType seafile_file_sync_error_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileFileSyncError, g_object_unref) +SeafileFileSyncError* seafile_file_sync_error_new (void); +SeafileFileSyncError* seafile_file_sync_error_construct (GType object_type); +gint seafile_file_sync_error_get_id (SeafileFileSyncError* self); +void seafile_file_sync_error_set_id (SeafileFileSyncError* self, + gint value); +const gchar* seafile_file_sync_error_get_repo_id (SeafileFileSyncError* self); +void seafile_file_sync_error_set_repo_id (SeafileFileSyncError* self, + const gchar* value); +const gchar* seafile_file_sync_error_get_repo_name (SeafileFileSyncError* self); +void seafile_file_sync_error_set_repo_name (SeafileFileSyncError* self, + const gchar* value); +const gchar* seafile_file_sync_error_get_path (SeafileFileSyncError* self); +void seafile_file_sync_error_set_path (SeafileFileSyncError* self, + const gchar* value); +gint seafile_file_sync_error_get_err_id (SeafileFileSyncError* self); +void seafile_file_sync_error_set_err_id (SeafileFileSyncError* self, + gint value); +gint64 seafile_file_sync_error_get_timestamp (SeafileFileSyncError* self); +void seafile_file_sync_error_set_timestamp (SeafileFileSyncError* self, + gint64 value); +GType seafile_task_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileTask, g_object_unref) +SeafileTask* seafile_task_new (void); +SeafileTask* seafile_task_construct (GType object_type); +const gchar* seafile_task_get_ttype (SeafileTask* self); +void seafile_task_set_ttype (SeafileTask* self, + const gchar* value); +const gchar* seafile_task_get_repo_id (SeafileTask* self); +void seafile_task_set_repo_id (SeafileTask* self, + const gchar* value); +const gchar* seafile_task_get_state (SeafileTask* self); +void seafile_task_set_state (SeafileTask* self, + const gchar* value); +const gchar* seafile_task_get_rt_state (SeafileTask* self); +void seafile_task_set_rt_state (SeafileTask* self, + const gchar* value); +gint64 seafile_task_get_block_total (SeafileTask* self); +void seafile_task_set_block_total (SeafileTask* self, + gint64 value); +gint64 seafile_task_get_block_done (SeafileTask* self); +void seafile_task_set_block_done (SeafileTask* self, + gint64 value); +gint seafile_task_get_fs_objects_total (SeafileTask* self); +void seafile_task_set_fs_objects_total (SeafileTask* self, + gint value); +gint seafile_task_get_fs_objects_done (SeafileTask* self); +void seafile_task_set_fs_objects_done (SeafileTask* self, + gint value); +gint seafile_task_get_rate (SeafileTask* self); +void seafile_task_set_rate (SeafileTask* self, + gint value); +GType seafile_clone_task_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileCloneTask, g_object_unref) +SeafileCloneTask* seafile_clone_task_new (void); +SeafileCloneTask* seafile_clone_task_construct (GType object_type); +const gchar* seafile_clone_task_get_state (SeafileCloneTask* self); +void seafile_clone_task_set_state (SeafileCloneTask* self, + const gchar* value); +gint seafile_clone_task_get_error (SeafileCloneTask* self); +void seafile_clone_task_set_error (SeafileCloneTask* self, + gint value); +const gchar* seafile_clone_task_get_repo_id (SeafileCloneTask* self); +void seafile_clone_task_set_repo_id (SeafileCloneTask* self, + const gchar* value); +const gchar* seafile_clone_task_get_repo_name (SeafileCloneTask* self); +void seafile_clone_task_set_repo_name (SeafileCloneTask* self, + const gchar* value); +const gchar* seafile_clone_task_get_worktree (SeafileCloneTask* self); +void seafile_clone_task_set_worktree (SeafileCloneTask* self, + const gchar* value); + +G_END_DECLS + +#endif diff --git a/lib/seafile-rpc-wrapper.c b/lib/seafile-rpc-wrapper.c index ed84a1da..41bc0480 100644 --- a/lib/seafile-rpc-wrapper.c +++ b/lib/seafile-rpc-wrapper.c @@ -1,8 +1,12 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +#if !defined(_MSC_VER) #include +#endif #include +#if !defined(_MSC_VER) #include +#endif #include #include #include diff --git a/lib/task.c b/lib/task.c new file mode 100644 index 00000000..605cb6e0 --- /dev/null +++ b/lib/task.c @@ -0,0 +1,773 @@ +/* task.c generated by valac 0.46.5, the Vala compiler + * generated from task.vala, do not modify */ + +#include +#include +#include +#include + +#define SEAFILE_TYPE_TASK (seafile_task_get_type ()) +#define SEAFILE_TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_TASK, SeafileTask)) +#define SEAFILE_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_TASK, SeafileTaskClass)) +#define SEAFILE_IS_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_TASK)) +#define SEAFILE_IS_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_TASK)) +#define SEAFILE_TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_TASK, SeafileTaskClass)) + +typedef struct _SeafileTask SeafileTask; +typedef struct _SeafileTaskClass SeafileTaskClass; +typedef struct _SeafileTaskPrivate SeafileTaskPrivate; +enum { + SEAFILE_TASK_0_PROPERTY, + SEAFILE_TASK_TTYPE_PROPERTY, + SEAFILE_TASK_REPO_ID_PROPERTY, + SEAFILE_TASK_STATE_PROPERTY, + SEAFILE_TASK_RT_STATE_PROPERTY, + SEAFILE_TASK_BLOCK_TOTAL_PROPERTY, + SEAFILE_TASK_BLOCK_DONE_PROPERTY, + SEAFILE_TASK_FS_OBJECTS_TOTAL_PROPERTY, + SEAFILE_TASK_FS_OBJECTS_DONE_PROPERTY, + SEAFILE_TASK_RATE_PROPERTY, + SEAFILE_TASK_NUM_PROPERTIES +}; +static GParamSpec* seafile_task_properties[SEAFILE_TASK_NUM_PROPERTIES]; +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define SEAFILE_TYPE_CLONE_TASK (seafile_clone_task_get_type ()) +#define SEAFILE_CLONE_TASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAFILE_TYPE_CLONE_TASK, SeafileCloneTask)) +#define SEAFILE_CLONE_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEAFILE_TYPE_CLONE_TASK, SeafileCloneTaskClass)) +#define SEAFILE_IS_CLONE_TASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAFILE_TYPE_CLONE_TASK)) +#define SEAFILE_IS_CLONE_TASK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAFILE_TYPE_CLONE_TASK)) +#define SEAFILE_CLONE_TASK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAFILE_TYPE_CLONE_TASK, SeafileCloneTaskClass)) + +typedef struct _SeafileCloneTask SeafileCloneTask; +typedef struct _SeafileCloneTaskClass SeafileCloneTaskClass; +typedef struct _SeafileCloneTaskPrivate SeafileCloneTaskPrivate; +enum { + SEAFILE_CLONE_TASK_0_PROPERTY, + SEAFILE_CLONE_TASK_STATE_PROPERTY, + SEAFILE_CLONE_TASK_ERROR_PROPERTY, + SEAFILE_CLONE_TASK_REPO_ID_PROPERTY, + SEAFILE_CLONE_TASK_REPO_NAME_PROPERTY, + SEAFILE_CLONE_TASK_WORKTREE_PROPERTY, + SEAFILE_CLONE_TASK_NUM_PROPERTIES +}; +static GParamSpec* seafile_clone_task_properties[SEAFILE_CLONE_TASK_NUM_PROPERTIES]; + +struct _SeafileTask { + GObject parent_instance; + SeafileTaskPrivate * priv; +}; + +struct _SeafileTaskClass { + GObjectClass parent_class; +}; + +struct _SeafileTaskPrivate { + gchar* _ttype; + gchar* _repo_id; + gchar* _state; + gchar* _rt_state; + gint64 _block_total; + gint64 _block_done; + gint _fs_objects_total; + gint _fs_objects_done; + gint _rate; +}; + +struct _SeafileCloneTask { + GObject parent_instance; + SeafileCloneTaskPrivate * priv; +}; + +struct _SeafileCloneTaskClass { + GObjectClass parent_class; +}; + +struct _SeafileCloneTaskPrivate { + gchar* _state; + gint _error; + gchar* _repo_id; + gchar* _repo_name; + gchar* _worktree; +}; + +static gint SeafileTask_private_offset; +static gpointer seafile_task_parent_class = NULL; +static gint SeafileCloneTask_private_offset; +static gpointer seafile_clone_task_parent_class = NULL; + +GType seafile_task_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileTask, g_object_unref) +SeafileTask* seafile_task_new (void); +SeafileTask* seafile_task_construct (GType object_type); +const gchar* seafile_task_get_ttype (SeafileTask* self); +void seafile_task_set_ttype (SeafileTask* self, + const gchar* value); +const gchar* seafile_task_get_repo_id (SeafileTask* self); +void seafile_task_set_repo_id (SeafileTask* self, + const gchar* value); +const gchar* seafile_task_get_state (SeafileTask* self); +void seafile_task_set_state (SeafileTask* self, + const gchar* value); +const gchar* seafile_task_get_rt_state (SeafileTask* self); +void seafile_task_set_rt_state (SeafileTask* self, + const gchar* value); +gint64 seafile_task_get_block_total (SeafileTask* self); +void seafile_task_set_block_total (SeafileTask* self, + gint64 value); +gint64 seafile_task_get_block_done (SeafileTask* self); +void seafile_task_set_block_done (SeafileTask* self, + gint64 value); +gint seafile_task_get_fs_objects_total (SeafileTask* self); +void seafile_task_set_fs_objects_total (SeafileTask* self, + gint value); +gint seafile_task_get_fs_objects_done (SeafileTask* self); +void seafile_task_set_fs_objects_done (SeafileTask* self, + gint value); +gint seafile_task_get_rate (SeafileTask* self); +void seafile_task_set_rate (SeafileTask* self, + gint value); +static void seafile_task_finalize (GObject * obj); +static void _vala_seafile_task_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_seafile_task_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); +GType seafile_clone_task_get_type (void) G_GNUC_CONST; +G_DEFINE_AUTOPTR_CLEANUP_FUNC (SeafileCloneTask, g_object_unref) +SeafileCloneTask* seafile_clone_task_new (void); +SeafileCloneTask* seafile_clone_task_construct (GType object_type); +const gchar* seafile_clone_task_get_state (SeafileCloneTask* self); +void seafile_clone_task_set_state (SeafileCloneTask* self, + const gchar* value); +gint seafile_clone_task_get_error (SeafileCloneTask* self); +void seafile_clone_task_set_error (SeafileCloneTask* self, + gint value); +const gchar* seafile_clone_task_get_repo_id (SeafileCloneTask* self); +void seafile_clone_task_set_repo_id (SeafileCloneTask* self, + const gchar* value); +const gchar* seafile_clone_task_get_repo_name (SeafileCloneTask* self); +void seafile_clone_task_set_repo_name (SeafileCloneTask* self, + const gchar* value); +const gchar* seafile_clone_task_get_worktree (SeafileCloneTask* self); +void seafile_clone_task_set_worktree (SeafileCloneTask* self, + const gchar* value); +static void seafile_clone_task_finalize (GObject * obj); +static void _vala_seafile_clone_task_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_seafile_clone_task_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); + +static inline gpointer +seafile_task_get_instance_private (SeafileTask* self) +{ + return G_STRUCT_MEMBER_P (self, SeafileTask_private_offset); +} + +SeafileTask* +seafile_task_construct (GType object_type) +{ + SeafileTask * self = NULL; + self = (SeafileTask*) g_object_new (object_type, NULL); + return self; +} + +SeafileTask* +seafile_task_new (void) +{ + return seafile_task_construct (SEAFILE_TYPE_TASK); +} + +const gchar* +seafile_task_get_ttype (SeafileTask* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_ttype; + result = _tmp0_; + return result; +} + +void +seafile_task_set_ttype (SeafileTask* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_task_get_ttype (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_ttype); + self->priv->_ttype = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_task_properties[SEAFILE_TASK_TTYPE_PROPERTY]); + } +} + +const gchar* +seafile_task_get_repo_id (SeafileTask* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_repo_id; + result = _tmp0_; + return result; +} + +void +seafile_task_set_repo_id (SeafileTask* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_task_get_repo_id (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_repo_id); + self->priv->_repo_id = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_task_properties[SEAFILE_TASK_REPO_ID_PROPERTY]); + } +} + +const gchar* +seafile_task_get_state (SeafileTask* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_state; + result = _tmp0_; + return result; +} + +void +seafile_task_set_state (SeafileTask* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_task_get_state (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_state); + self->priv->_state = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_task_properties[SEAFILE_TASK_STATE_PROPERTY]); + } +} + +const gchar* +seafile_task_get_rt_state (SeafileTask* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_rt_state; + result = _tmp0_; + return result; +} + +void +seafile_task_set_rt_state (SeafileTask* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_task_get_rt_state (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_rt_state); + self->priv->_rt_state = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_task_properties[SEAFILE_TASK_RT_STATE_PROPERTY]); + } +} + +gint64 +seafile_task_get_block_total (SeafileTask* self) +{ + gint64 result; + g_return_val_if_fail (self != NULL, 0LL); + result = self->priv->_block_total; + return result; +} + +void +seafile_task_set_block_total (SeafileTask* self, + gint64 value) +{ + g_return_if_fail (self != NULL); + if (seafile_task_get_block_total (self) != value) { + self->priv->_block_total = value; + g_object_notify_by_pspec ((GObject *) self, seafile_task_properties[SEAFILE_TASK_BLOCK_TOTAL_PROPERTY]); + } +} + +gint64 +seafile_task_get_block_done (SeafileTask* self) +{ + gint64 result; + g_return_val_if_fail (self != NULL, 0LL); + result = self->priv->_block_done; + return result; +} + +void +seafile_task_set_block_done (SeafileTask* self, + gint64 value) +{ + g_return_if_fail (self != NULL); + if (seafile_task_get_block_done (self) != value) { + self->priv->_block_done = value; + g_object_notify_by_pspec ((GObject *) self, seafile_task_properties[SEAFILE_TASK_BLOCK_DONE_PROPERTY]); + } +} + +gint +seafile_task_get_fs_objects_total (SeafileTask* self) +{ + gint result; + g_return_val_if_fail (self != NULL, 0); + result = self->priv->_fs_objects_total; + return result; +} + +void +seafile_task_set_fs_objects_total (SeafileTask* self, + gint value) +{ + g_return_if_fail (self != NULL); + if (seafile_task_get_fs_objects_total (self) != value) { + self->priv->_fs_objects_total = value; + g_object_notify_by_pspec ((GObject *) self, seafile_task_properties[SEAFILE_TASK_FS_OBJECTS_TOTAL_PROPERTY]); + } +} + +gint +seafile_task_get_fs_objects_done (SeafileTask* self) +{ + gint result; + g_return_val_if_fail (self != NULL, 0); + result = self->priv->_fs_objects_done; + return result; +} + +void +seafile_task_set_fs_objects_done (SeafileTask* self, + gint value) +{ + g_return_if_fail (self != NULL); + if (seafile_task_get_fs_objects_done (self) != value) { + self->priv->_fs_objects_done = value; + g_object_notify_by_pspec ((GObject *) self, seafile_task_properties[SEAFILE_TASK_FS_OBJECTS_DONE_PROPERTY]); + } +} + +gint +seafile_task_get_rate (SeafileTask* self) +{ + gint result; + g_return_val_if_fail (self != NULL, 0); + result = self->priv->_rate; + return result; +} + +void +seafile_task_set_rate (SeafileTask* self, + gint value) +{ + g_return_if_fail (self != NULL); + if (seafile_task_get_rate (self) != value) { + self->priv->_rate = value; + g_object_notify_by_pspec ((GObject *) self, seafile_task_properties[SEAFILE_TASK_RATE_PROPERTY]); + } +} + +static void +seafile_task_class_init (SeafileTaskClass * klass, + gpointer klass_data) +{ + seafile_task_parent_class = g_type_class_peek_parent (klass); + g_type_class_adjust_private_offset (klass, &SeafileTask_private_offset); + G_OBJECT_CLASS (klass)->get_property = _vala_seafile_task_get_property; + G_OBJECT_CLASS (klass)->set_property = _vala_seafile_task_set_property; + G_OBJECT_CLASS (klass)->finalize = seafile_task_finalize; + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_TASK_TTYPE_PROPERTY, seafile_task_properties[SEAFILE_TASK_TTYPE_PROPERTY] = g_param_spec_string ("ttype", "ttype", "ttype", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_TASK_REPO_ID_PROPERTY, seafile_task_properties[SEAFILE_TASK_REPO_ID_PROPERTY] = g_param_spec_string ("repo-id", "repo-id", "repo-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_TASK_STATE_PROPERTY, seafile_task_properties[SEAFILE_TASK_STATE_PROPERTY] = g_param_spec_string ("state", "state", "state", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_TASK_RT_STATE_PROPERTY, seafile_task_properties[SEAFILE_TASK_RT_STATE_PROPERTY] = g_param_spec_string ("rt-state", "rt-state", "rt-state", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_TASK_BLOCK_TOTAL_PROPERTY, seafile_task_properties[SEAFILE_TASK_BLOCK_TOTAL_PROPERTY] = g_param_spec_int64 ("block-total", "block-total", "block-total", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_TASK_BLOCK_DONE_PROPERTY, seafile_task_properties[SEAFILE_TASK_BLOCK_DONE_PROPERTY] = g_param_spec_int64 ("block-done", "block-done", "block-done", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_TASK_FS_OBJECTS_TOTAL_PROPERTY, seafile_task_properties[SEAFILE_TASK_FS_OBJECTS_TOTAL_PROPERTY] = g_param_spec_int ("fs-objects-total", "fs-objects-total", "fs-objects-total", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_TASK_FS_OBJECTS_DONE_PROPERTY, seafile_task_properties[SEAFILE_TASK_FS_OBJECTS_DONE_PROPERTY] = g_param_spec_int ("fs-objects-done", "fs-objects-done", "fs-objects-done", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_TASK_RATE_PROPERTY, seafile_task_properties[SEAFILE_TASK_RATE_PROPERTY] = g_param_spec_int ("rate", "rate", "rate", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +} + +static void +seafile_task_instance_init (SeafileTask * self, + gpointer klass) +{ + self->priv = seafile_task_get_instance_private (self); +} + +static void +seafile_task_finalize (GObject * obj) +{ + SeafileTask * self; + self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEAFILE_TYPE_TASK, SeafileTask); + _g_free0 (self->priv->_ttype); + _g_free0 (self->priv->_repo_id); + _g_free0 (self->priv->_state); + _g_free0 (self->priv->_rt_state); + G_OBJECT_CLASS (seafile_task_parent_class)->finalize (obj); +} + +GType +seafile_task_get_type (void) +{ + static volatile gsize seafile_task_type_id__volatile = 0; + if (g_once_init_enter (&seafile_task_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (SeafileTaskClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) seafile_task_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeafileTask), 0, (GInstanceInitFunc) seafile_task_instance_init, NULL }; + GType seafile_task_type_id; + seafile_task_type_id = g_type_register_static (G_TYPE_OBJECT, "SeafileTask", &g_define_type_info, 0); + SeafileTask_private_offset = g_type_add_instance_private (seafile_task_type_id, sizeof (SeafileTaskPrivate)); + g_once_init_leave (&seafile_task_type_id__volatile, seafile_task_type_id); + } + return seafile_task_type_id__volatile; +} + +static void +_vala_seafile_task_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + SeafileTask * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_TASK, SeafileTask); + switch (property_id) { + case SEAFILE_TASK_TTYPE_PROPERTY: + g_value_set_string (value, seafile_task_get_ttype (self)); + break; + case SEAFILE_TASK_REPO_ID_PROPERTY: + g_value_set_string (value, seafile_task_get_repo_id (self)); + break; + case SEAFILE_TASK_STATE_PROPERTY: + g_value_set_string (value, seafile_task_get_state (self)); + break; + case SEAFILE_TASK_RT_STATE_PROPERTY: + g_value_set_string (value, seafile_task_get_rt_state (self)); + break; + case SEAFILE_TASK_BLOCK_TOTAL_PROPERTY: + g_value_set_int64 (value, seafile_task_get_block_total (self)); + break; + case SEAFILE_TASK_BLOCK_DONE_PROPERTY: + g_value_set_int64 (value, seafile_task_get_block_done (self)); + break; + case SEAFILE_TASK_FS_OBJECTS_TOTAL_PROPERTY: + g_value_set_int (value, seafile_task_get_fs_objects_total (self)); + break; + case SEAFILE_TASK_FS_OBJECTS_DONE_PROPERTY: + g_value_set_int (value, seafile_task_get_fs_objects_done (self)); + break; + case SEAFILE_TASK_RATE_PROPERTY: + g_value_set_int (value, seafile_task_get_rate (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +_vala_seafile_task_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + SeafileTask * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_TASK, SeafileTask); + switch (property_id) { + case SEAFILE_TASK_TTYPE_PROPERTY: + seafile_task_set_ttype (self, g_value_get_string (value)); + break; + case SEAFILE_TASK_REPO_ID_PROPERTY: + seafile_task_set_repo_id (self, g_value_get_string (value)); + break; + case SEAFILE_TASK_STATE_PROPERTY: + seafile_task_set_state (self, g_value_get_string (value)); + break; + case SEAFILE_TASK_RT_STATE_PROPERTY: + seafile_task_set_rt_state (self, g_value_get_string (value)); + break; + case SEAFILE_TASK_BLOCK_TOTAL_PROPERTY: + seafile_task_set_block_total (self, g_value_get_int64 (value)); + break; + case SEAFILE_TASK_BLOCK_DONE_PROPERTY: + seafile_task_set_block_done (self, g_value_get_int64 (value)); + break; + case SEAFILE_TASK_FS_OBJECTS_TOTAL_PROPERTY: + seafile_task_set_fs_objects_total (self, g_value_get_int (value)); + break; + case SEAFILE_TASK_FS_OBJECTS_DONE_PROPERTY: + seafile_task_set_fs_objects_done (self, g_value_get_int (value)); + break; + case SEAFILE_TASK_RATE_PROPERTY: + seafile_task_set_rate (self, g_value_get_int (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static inline gpointer +seafile_clone_task_get_instance_private (SeafileCloneTask* self) +{ + return G_STRUCT_MEMBER_P (self, SeafileCloneTask_private_offset); +} + +SeafileCloneTask* +seafile_clone_task_construct (GType object_type) +{ + SeafileCloneTask * self = NULL; + self = (SeafileCloneTask*) g_object_new (object_type, NULL); + return self; +} + +SeafileCloneTask* +seafile_clone_task_new (void) +{ + return seafile_clone_task_construct (SEAFILE_TYPE_CLONE_TASK); +} + +const gchar* +seafile_clone_task_get_state (SeafileCloneTask* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_state; + result = _tmp0_; + return result; +} + +void +seafile_clone_task_set_state (SeafileCloneTask* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_clone_task_get_state (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_state); + self->priv->_state = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_clone_task_properties[SEAFILE_CLONE_TASK_STATE_PROPERTY]); + } +} + +gint +seafile_clone_task_get_error (SeafileCloneTask* self) +{ + gint result; + g_return_val_if_fail (self != NULL, 0); + result = self->priv->_error; + return result; +} + +void +seafile_clone_task_set_error (SeafileCloneTask* self, + gint value) +{ + g_return_if_fail (self != NULL); + if (seafile_clone_task_get_error (self) != value) { + self->priv->_error = value; + g_object_notify_by_pspec ((GObject *) self, seafile_clone_task_properties[SEAFILE_CLONE_TASK_ERROR_PROPERTY]); + } +} + +const gchar* +seafile_clone_task_get_repo_id (SeafileCloneTask* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_repo_id; + result = _tmp0_; + return result; +} + +void +seafile_clone_task_set_repo_id (SeafileCloneTask* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_clone_task_get_repo_id (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_repo_id); + self->priv->_repo_id = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_clone_task_properties[SEAFILE_CLONE_TASK_REPO_ID_PROPERTY]); + } +} + +const gchar* +seafile_clone_task_get_repo_name (SeafileCloneTask* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_repo_name; + result = _tmp0_; + return result; +} + +void +seafile_clone_task_set_repo_name (SeafileCloneTask* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_clone_task_get_repo_name (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_repo_name); + self->priv->_repo_name = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_clone_task_properties[SEAFILE_CLONE_TASK_REPO_NAME_PROPERTY]); + } +} + +const gchar* +seafile_clone_task_get_worktree (SeafileCloneTask* self) +{ + const gchar* result; + const gchar* _tmp0_; + g_return_val_if_fail (self != NULL, NULL); + _tmp0_ = self->priv->_worktree; + result = _tmp0_; + return result; +} + +void +seafile_clone_task_set_worktree (SeafileCloneTask* self, + const gchar* value) +{ + g_return_if_fail (self != NULL); + if (g_strcmp0 (value, seafile_clone_task_get_worktree (self)) != 0) { + gchar* _tmp0_; + _tmp0_ = g_strdup (value); + _g_free0 (self->priv->_worktree); + self->priv->_worktree = _tmp0_; + g_object_notify_by_pspec ((GObject *) self, seafile_clone_task_properties[SEAFILE_CLONE_TASK_WORKTREE_PROPERTY]); + } +} + +static void +seafile_clone_task_class_init (SeafileCloneTaskClass * klass, + gpointer klass_data) +{ + seafile_clone_task_parent_class = g_type_class_peek_parent (klass); + g_type_class_adjust_private_offset (klass, &SeafileCloneTask_private_offset); + G_OBJECT_CLASS (klass)->get_property = _vala_seafile_clone_task_get_property; + G_OBJECT_CLASS (klass)->set_property = _vala_seafile_clone_task_set_property; + G_OBJECT_CLASS (klass)->finalize = seafile_clone_task_finalize; + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_CLONE_TASK_STATE_PROPERTY, seafile_clone_task_properties[SEAFILE_CLONE_TASK_STATE_PROPERTY] = g_param_spec_string ("state", "state", "state", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_CLONE_TASK_ERROR_PROPERTY, seafile_clone_task_properties[SEAFILE_CLONE_TASK_ERROR_PROPERTY] = g_param_spec_int ("error", "error", "error", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_CLONE_TASK_REPO_ID_PROPERTY, seafile_clone_task_properties[SEAFILE_CLONE_TASK_REPO_ID_PROPERTY] = g_param_spec_string ("repo-id", "repo-id", "repo-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_CLONE_TASK_REPO_NAME_PROPERTY, seafile_clone_task_properties[SEAFILE_CLONE_TASK_REPO_NAME_PROPERTY] = g_param_spec_string ("repo-name", "repo-name", "repo-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_CLONE_TASK_WORKTREE_PROPERTY, seafile_clone_task_properties[SEAFILE_CLONE_TASK_WORKTREE_PROPERTY] = g_param_spec_string ("worktree", "worktree", "worktree", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +} + +static void +seafile_clone_task_instance_init (SeafileCloneTask * self, + gpointer klass) +{ + self->priv = seafile_clone_task_get_instance_private (self); +} + +static void +seafile_clone_task_finalize (GObject * obj) +{ + SeafileCloneTask * self; + self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEAFILE_TYPE_CLONE_TASK, SeafileCloneTask); + _g_free0 (self->priv->_state); + _g_free0 (self->priv->_repo_id); + _g_free0 (self->priv->_repo_name); + _g_free0 (self->priv->_worktree); + G_OBJECT_CLASS (seafile_clone_task_parent_class)->finalize (obj); +} + +GType +seafile_clone_task_get_type (void) +{ + static volatile gsize seafile_clone_task_type_id__volatile = 0; + if (g_once_init_enter (&seafile_clone_task_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (SeafileCloneTaskClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) seafile_clone_task_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeafileCloneTask), 0, (GInstanceInitFunc) seafile_clone_task_instance_init, NULL }; + GType seafile_clone_task_type_id; + seafile_clone_task_type_id = g_type_register_static (G_TYPE_OBJECT, "SeafileCloneTask", &g_define_type_info, 0); + SeafileCloneTask_private_offset = g_type_add_instance_private (seafile_clone_task_type_id, sizeof (SeafileCloneTaskPrivate)); + g_once_init_leave (&seafile_clone_task_type_id__volatile, seafile_clone_task_type_id); + } + return seafile_clone_task_type_id__volatile; +} + +static void +_vala_seafile_clone_task_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ + SeafileCloneTask * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_CLONE_TASK, SeafileCloneTask); + switch (property_id) { + case SEAFILE_CLONE_TASK_STATE_PROPERTY: + g_value_set_string (value, seafile_clone_task_get_state (self)); + break; + case SEAFILE_CLONE_TASK_ERROR_PROPERTY: + g_value_set_int (value, seafile_clone_task_get_error (self)); + break; + case SEAFILE_CLONE_TASK_REPO_ID_PROPERTY: + g_value_set_string (value, seafile_clone_task_get_repo_id (self)); + break; + case SEAFILE_CLONE_TASK_REPO_NAME_PROPERTY: + g_value_set_string (value, seafile_clone_task_get_repo_name (self)); + break; + case SEAFILE_CLONE_TASK_WORKTREE_PROPERTY: + g_value_set_string (value, seafile_clone_task_get_worktree (self)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +_vala_seafile_clone_task_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ + SeafileCloneTask * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_CLONE_TASK, SeafileCloneTask); + switch (property_id) { + case SEAFILE_CLONE_TASK_STATE_PROPERTY: + seafile_clone_task_set_state (self, g_value_get_string (value)); + break; + case SEAFILE_CLONE_TASK_ERROR_PROPERTY: + seafile_clone_task_set_error (self, g_value_get_int (value)); + break; + case SEAFILE_CLONE_TASK_REPO_ID_PROPERTY: + seafile_clone_task_set_repo_id (self, g_value_get_string (value)); + break; + case SEAFILE_CLONE_TASK_REPO_NAME_PROPERTY: + seafile_clone_task_set_repo_name (self, g_value_get_string (value)); + break; + case SEAFILE_CLONE_TASK_WORKTREE_PROPERTY: + seafile_clone_task_set_worktree (self, g_value_get_string (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + diff --git a/lib/utils.c b/lib/utils.c index 2fbc000f..a89421fd 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -1,7 +1,5 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -#include - #include "common.h" #ifdef WIN32 @@ -20,21 +18,25 @@ #include #include #include +#include #else #include #endif #ifndef WIN32 +#include #include #include #endif +#ifndef WIN32 #include +#include +#endif #include #include #include -#include #include #include #include @@ -46,7 +48,9 @@ #include +#ifndef WIN32 #include +#endif #include @@ -385,9 +389,9 @@ seaf_stat (const char *path, SeafStat *st) memset (st, 0, sizeof(SeafStat)); if (attrs.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - st->st_mode = (S_IFDIR | S_IRWXU); + st->st_mode = S_IFDIR; else - st->st_mode = (S_IFREG | S_IRUSR | S_IWUSR); + st->st_mode = S_IFREG; st->st_atime = file_time_to_unix_time (&attrs.ftLastAccessTime); st->st_ctime = file_time_to_unix_time (&attrs.ftCreationTime); @@ -428,9 +432,9 @@ seaf_stat_from_find_data (WIN32_FIND_DATAW *fdata, SeafStat *st) memset (st, 0, sizeof(SeafStat)); if (fdata->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - st->st_mode = (S_IFDIR | S_IRWXU); + st->st_mode = S_IFDIR; else - st->st_mode = (S_IFREG | S_IRUSR | S_IWUSR); + st->st_mode = S_IFREG; st->st_atime = file_time_to_unix_time (&fdata->ftLastAccessTime); st->st_ctime = file_time_to_unix_time (&fdata->ftCreationTime); @@ -1279,9 +1283,9 @@ char* gen_uuid () UUID uuid; UuidCreate(&uuid); - UuidToString(&uuid, &str); + UuidToStringA(&uuid, &str); memcpy(uuid_str, str, 37); - RpcStringFree(&str); + RpcStringFreeA(&str); return uuid_str; } @@ -1291,9 +1295,9 @@ void gen_uuid_inplace (char *buf) UUID uuid; UuidCreate(&uuid); - UuidToString(&uuid, &str); + UuidToStringA(&uuid, &str); memcpy(buf, str, 37); - RpcStringFree(&str); + RpcStringFreeA(&str); } gboolean @@ -1303,7 +1307,7 @@ is_uuid_valid (const char *uuid_str) return FALSE; UUID uuid; - if (UuidFromString((unsigned char *)uuid_str, &uuid) != RPC_S_OK) + if (UuidFromStringA((unsigned char *)uuid_str, &uuid) != RPC_S_OK) return FALSE; return TRUE; } @@ -1806,7 +1810,7 @@ get_process_handle (const char *process_name_in) continue; if (EnumProcessModules(hProcess, &hMod, sizeof(hMod), &cbNeeded)) { - GetModuleBaseName(hProcess, hMod, process_name, + GetModuleBaseNameA(hProcess, hMod, process_name, sizeof(process_name)/sizeof(char)); } @@ -1853,7 +1857,7 @@ int count_process (const char *process_name_in) if (EnumProcessModules(hProcess, hMods, sizeof(hMods), &cbNeeded)) { for (j = 0; j < cbNeeded / sizeof(HMODULE); j++) { - if (GetModuleBaseName(hProcess, hMods[j], process_name, + if (GetModuleBaseNameA(hProcess, hMods[j], process_name, sizeof(process_name))) { if (strcasecmp(process_name, name) == 0) count++; diff --git a/lib/utils.h b/lib/utils.h index f166dfe6..6d9ac729 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -11,10 +11,12 @@ #include #endif +#ifndef WIN32 #include +#include +#endif #include #include -#include #include #include #include @@ -39,6 +41,10 @@ #include #include +#define mode_t int + +#define ssize_t gssize + #ifndef WEXITSTATUS #define WEXITSTATUS(status) (((status) & 0xff00) >> 8) #endif @@ -142,15 +148,27 @@ should_ignore_on_checkout (const char *file_path, IgnoreReason *ignore_reason); /* for debug */ #ifndef ccnet_warning +#ifndef WIN32 #define ccnet_warning(fmt, ...) g_warning("%s(%d): " fmt, __FILE__, __LINE__, ##__VA_ARGS__) +#else +#define ccnet_warning(...) g_warning (__VA_ARGS__) +#endif #endif #ifndef ccnet_error +#ifndef WIN32 #define ccnet_error(fmt, ...) g_error("%s(%d): " fmt, __FILE__, __LINE__, ##__VA_ARGS__) +#else +#define ccnet_error(...) g_error(__VA_ARGS__) +#endif #endif #ifndef ccnet_message +#ifndef WIN32 #define ccnet_message(fmt, ...) g_message("%s(%d): " fmt, __FILE__, __LINE__, ##__VA_ARGS__) +#else +#define ccnet_message(...) g_message(__VA_ARGS__) +#endif #endif #define CCNET_DOMAIN g_quark_from_string("ccnet") diff --git a/msi/custom/seafile_custom.sln b/msi/custom/seafile_custom.sln new file mode 100644 index 00000000..eb7d2871 --- /dev/null +++ b/msi/custom/seafile_custom.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30611.23 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "seafile_custom", "..\seafile_custom.vcxproj", "{D0B1637D-AF0E-4724-B4E4-DCFF641EBB4B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D0B1637D-AF0E-4724-B4E4-DCFF641EBB4B}.Debug|x64.ActiveCfg = Debug|x64 + {D0B1637D-AF0E-4724-B4E4-DCFF641EBB4B}.Debug|x64.Build.0 = Debug|x64 + {D0B1637D-AF0E-4724-B4E4-DCFF641EBB4B}.Debug|x86.ActiveCfg = Debug|Win32 + {D0B1637D-AF0E-4724-B4E4-DCFF641EBB4B}.Debug|x86.Build.0 = Debug|Win32 + {D0B1637D-AF0E-4724-B4E4-DCFF641EBB4B}.Release|x64.ActiveCfg = Release|x64 + {D0B1637D-AF0E-4724-B4E4-DCFF641EBB4B}.Release|x64.Build.0 = Release|x64 + {D0B1637D-AF0E-4724-B4E4-DCFF641EBB4B}.Release|x86.ActiveCfg = Release|Win32 + {D0B1637D-AF0E-4724-B4E4-DCFF641EBB4B}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {1F899345-72EA-47B3-B3B9-EB5CA31D6238} + EndGlobalSection +EndGlobal diff --git a/msi/custom/seafile_custom.vcxproj b/msi/custom/seafile_custom.vcxproj new file mode 100644 index 00000000..150a76cf --- /dev/null +++ b/msi/custom/seafile_custom.vcxproj @@ -0,0 +1,162 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + 16.0 + Win32Proj + {d0b1637d-af0e-4724-b4e4-dcff641ebb4b} + seafilecustom + 10.0 + + + + DynamicLibrary + true + v142 + Unicode + + + DynamicLibrary + false + v142 + true + Unicode + + + DynamicLibrary + true + v142 + Unicode + + + DynamicLibrary + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + $(ProjectDir)$(Platform)\$(Configuration)\ + seafile_custom64 + + + + Level3 + true + WIN32;_DEBUG;SEAFILECUSTOM_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + + + + + Level3 + true + true + true + WIN32;NDEBUG;SEAFILECUSTOM_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + true + true + false + + + + + Level3 + true + _DEBUG;SEAFILECUSTOM_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + + + + + Level3 + true + true + true + NDEBUG;SEAFILECUSTOM_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + NotUsing + pch.h + + + Windows + true + true + true + false + $(ProjectDir)custom.def + + + + + + \ No newline at end of file diff --git a/msi/custom/seafile_custom.vcxproj.filters b/msi/custom/seafile_custom.vcxproj.filters new file mode 100644 index 00000000..4ab27d57 --- /dev/null +++ b/msi/custom/seafile_custom.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/msi/seafile.wxs b/msi/seafile.wxs index 7d0a374f..61ea5b74 100644 --- a/msi/seafile.wxs +++ b/msi/seafile.wxs @@ -78,13 +78,13 @@ - + - + @@ -143,10 +143,10 @@ - + - + + ((REMOVE="ALL") OR UPGRADINGPRODUCTCODE OR WIX_UPGRADE_DETECTED) AND VersionNT64 diff --git a/scripts/build/build-msi-vs.py b/scripts/build/build-msi-vs.py new file mode 100644 index 00000000..4dec6ce3 --- /dev/null +++ b/scripts/build/build-msi-vs.py @@ -0,0 +1,499 @@ +#!/usr/bin/env python +# coding: UTF-8 + +import sys + +#################### +### Requires Python 3+ +#################### +if sys.version_info[0] == 2: + print('Python 2 not be supported, require Python 3. Quit now.') + sys.exit(1) + +import os +import subprocess +import shutil +import time +import glob +import re + +BUILDDIR = os.path.join(os.getcwd(), "..\\..\\..\\") + +################## +### Configure +################## +# The seafile package project directory +# Directory where the signing certificate is located +CERTFILE = "C:/certs/seafile.pfx" + +# Qt library directory +QT_DIR = "C:/Qt/Qt5.13.1/5.13.1/msvc2017_64/" + +# Wix install directory +WIX_BIN = "C:/wix/bin" + +# Openssl lib directory +OPENSSL_DIR = "C:/packagelib" + +##################### +# Work path : seafile library and program tmp directory +# and wix build path +##################### +# Package directory +SLNOUTPUTDIR = os.path.join(BUILDDIR, "pack") + +# Wix package directory +WIX_PACKAGE_DIR = "C:/pack" + +#################### +### Global variables +################### +RETRY_COUNT = 3 +error_exit = False +version = '' + +#################### +### Common helper functions +################### + +def highlight(content, is_error=False): + '''Add ANSI color to content to get it highlighted on terminal''' + dummy = is_error + return content + # if is_error: + # return '\x1b[1;31m%s\x1b[m' % content + # else: + # return '\x1b[1;32m%s\x1b[m' % content + +def info(msg): + print(highlight('[INFO] ') + msg) + +def error(msg=None, usage=None): + if msg: + print(highlight('[ERROR] ') + msg) + if usage: + print(usage) + sys.exit(1) + +def find_in_path(prog): + '''Test whether prog exists in system path''' + dirs = os.environ['PATH'].split(';') + for d in dirs: + if d == '': + continue + path = os.path.join(d, prog) + if os.path.exists(path): + return path + + return None + +def run(cmdline, cwd=None, env=None, suppress_stdout=False, suppress_stderr=False): + '''Specify a command line string''' + info('running %s, cwd=%s' % (cmdline, cwd if cwd else os.getcwd())) + with open(os.devnull, 'w') as devnull: + if suppress_stdout: + stdout = devnull + else: + stdout = sys.stdout + + if suppress_stderr: + stderr = devnull + else: + stderr = sys.stderr + + proc = subprocess.Popen(cmdline, + cwd=cwd, + stdout=stdout, + stderr=stderr, + env=env, + shell=True) + ret = proc.wait() + if ret != 0: + global error_exit + error_exit = True + return ret + +def must_copy(src, dst): + '''Copy src to dst, exit on failure''' + try: + shutil.copy(src, dst) + except Exception as e: + error('failed to copy %s to %s: %s' % (src, dst, e)) + +def must_copytree(src, dst): + '''Copy dir src to dst, exit on failure''' + try: + shutil.copytree(src, dst) + except Exception as e: + error('failed to copy dir %s to %s: %s' % (src, dst, e)) + +def must_rmtree(path): + '''Recurse rm dir, exit on failure''' + try: + shutil.rmtree(path) + except Exception as e: + error('failed rm dir %s : %s' % (path, e)) + +def must_rename(src, dst): + '''Rename src to dst, exit on failure''' + try: + os.rename(src,dst) + + except Exception as e: + error('failed to rename %s to %s: %s' % (src, dst, e)) + +def must_mkdir(path): + '''Creating directories recursively, exit on failure''' + if os.path.exists(path): + return + try: + os.makedirs(path) + except OSError as e: + error('failed to create directory %s:%s' % (path, e)) + +def dump_env(): + print('Dumping environment variables:') + for k, v in os.environ.items(): + print('%s: %s' % (k, v) +) + +def do_sign(certfile, fn, desc=None): + info('signing file {} using cert "{}"'.format(fn, certfile)) + + if desc: + desc_flags = '-d "{}"'.format(desc) + else: + desc_flags = '' + + signcmd = 'signtool.exe sign -fd sha256 -t http://timestamp.comodoca.com -f {} {} {}'.format(certfile, desc_flags, fn) + i = 0 + while i < RETRY_COUNT: + time.sleep(30) + ret = run(signcmd, cwd=os.path.dirname(fn)) + if ret == 0: + break + i = i + 1 + if i == RETRY_COUNT: + error('Failed to sign file "{}"'.format(fn)) + +def initworkspace(): + # Clear build file cache + if os.path.exists(SLNOUTPUTDIR) : + must_rmtree(SLNOUTPUTDIR) + + # Create a package directory + must_mkdir(SLNOUTPUTDIR) + +def check_project_version(version): + '''A valid version must be like 1.2.2, 1.3''' + if not re.match(r'^[0-9]+(\.[0-9]+)+$', version): + error('%s is not a valid version' % version, usage="vs-build.py 2.0.0") + +def check_cmd_para(): + args = sys.argv + if len(args) != 2: + error('The number of parameters is incorrect', usage="vs-build.py 2.0.0") + global version + version = args[1] + check_project_version(version) + + +class Project(object): + '''Base class for a project''' + # Probject name, i.e. libseaprc/seafile/seafile-gui + name = '' + + # A list of shell commands to configure/build the project + build_commands = [] + + def __init__(self): + self.prefix = BUILDDIR + self.projdir = os.path.join(self.prefix, self.name) + self.outdir = os.path.join(self.projdir, 'x64', 'Release') + + def before_build(self): + '''Hook method to do project-specific stuff before running build commands''' + pass + + def build(self): + '''Build the source''' + self.before_build() + info('Building %s' % self.name) + # dump_env() + for cmd in self.build_commands: + if run(cmd, cwd=self.projdir) != 0: + error('error when running command:\n\t%s\n' % cmd) + self.after_build() + + def after_build(self): + pass + + +class Libsearpc(Project): + name = 'libsearpc' + + def __init__(self): + Project.__init__(self) + self.build_commands = [ + 'devenv "%s/libsearpc.sln" /Rebuild "Release|x64"' %(self.projdir), + ] + + def after_build(self): + libsearpc_path = os.path.join(self.outdir, 'libsearpc.dll') + must_copy(libsearpc_path, SLNOUTPUTDIR) + + +class Seafile(Project): + name = 'seafile' + def __init__(self): + Project.__init__(self) + self.build_commands = [ + 'devenv %s/seafile.sln /Rebuild "Release|x64"' %(self.projdir), + 'devenv %s/msi/custom/seafile_custom.sln /Rebuild "Release|x64"' %(self.projdir), + ] + + def before_build(self): + pass + + def after_build(self): + + # Copy seafile dll file to SLNOUTPUTDIR + dlls = glob.glob(os.path.join(self.outdir, '*.dll')) + for dll in dlls: + must_copy(dll, SLNOUTPUTDIR) + + # Copy seafile.exe file to SLNOUTPUTDIR + must_copy(os.path.join(self.outdir, 'seaf-daemon.exe'), SLNOUTPUTDIR) + + # Generate breakpad symbol + dump_syms_path = os.path.join(BUILDDIR, 'breakpad', 'src', 'tools', 'windows', 'Release', 'dump_syms.exe') + pdb_path = os.path.join(self.outdir, 'seaf-daemon.pdb') + sym_path = os.path.join(self.outdir, 'seaf-daemon.sym') + + cmd = '%s %s > %s' %(dump_syms_path, pdb_path, sym_path) + if run(cmd, BUILDDIR) != 0: + error('error when running command:\n\t%s\n' % cmd) + + +class SeafileGUI(Project): + name = 'seafile-client' + target_name = 'seafile-applet.exe' + def __init__(self): + Project.__init__(self) + self.build_commands = [ + 'devenv %s/seafile-client.sln /Rebuild "Release|x64"' %(self.projdir) , + ] + + def before_build(self): + pass + + def after_build(self): + # Copy WinSparkle.dll to SLNOUTPUTDIR + must_copy(os.path.join(self.projdir, 'third_party', 'WinSparkle-0.5.3', 'x64', 'Release', 'WinSparkle.dll'), SLNOUTPUTDIR) + + # Copy dll to SLNOUTPUTDIR + dlls = glob.glob(os.path.join(self.outdir, '*.dll')) + for dll in dlls: + if not os.path.exists(dll) : + must_copy(dll, SLNOUTPUTDIR) + + # Copy openssl lib to package dir + # openssl_lib_path_list = glob.glob(os.path.join(OPENSSL_DIR, '*.dll')) + # for lib in openssl_lib_path_list : + # must_copy(lib, SLNOUTPUTDIR) + + # Copy seafile-applet.exe to SLNOUTPUTDIR + must_copy(os.path.join(self.outdir, self.target_name), SLNOUTPUTDIR) + + # Use windeloyqt.exe to copy qt resource file and lib + windeployqt_path = os.path.join(QT_DIR, 'bin', 'windeployqt.exe') + seafile_exe_path = os.path.join(SLNOUTPUTDIR, self.target_name) + cmd = "%s --no-compiler-runtime %s" % (windeployqt_path, seafile_exe_path) + if run(cmd, cwd = SLNOUTPUTDIR) != 0: + error('error when running command:\n\t%s\n' % cmd) + + # Sign seafile exe + need_sign_exe = [ + os.path.join(SLNOUTPUTDIR, self.target_name), + os.path.join(SLNOUTPUTDIR, 'seaf-daemon.exe') + ] + + for fn in need_sign_exe: + do_sign(CERTFILE, fn) + + # Generate breakpad symbol + dump_syms_path = os.path.join(BUILDDIR, 'breakpad', 'src', 'tools', 'windows', 'Release', 'dump_syms.exe') + pdb_path = os.path.join(self.outdir, 'seafile-applet.pdb') + sym_path = os.path.join(self.outdir, 'seafile-applet.sym') + + cmd = '%s %s > %s' %(dump_syms_path, pdb_path, sym_path) + if run(cmd, BUILDDIR) != 0: + error('error when running command:\n\t%s\n' % cmd) + + +class SeafileShellExt(Project): + name = 'seafile-shell-ext' + def __init__(self): + Project.__init__(self) + self.build_commands = [ + 'devenv %s/extensions/seafile_ext.sln /Rebuild "Release|x64"' %(self.projdir), + 'devenv %s/shellext-fix/shellext-fix.sln /Rebuild "Release|x64"' %(self.projdir), + ] + def before_build(self): + pass + + def after_build(self): + # Copy shellext-fix.exe to SLNOUTPUTDIR + shellext_fix_target = os.path.join(self.projdir, 'shellext-fix', 'x64\\Release', 'shellext-fix.exe') + must_copy(shellext_fix_target, SLNOUTPUTDIR) + + # Sign seafileext-fix.exe + do_sign(CERTFILE, os.path.join(SLNOUTPUTDIR, 'shellext-fix.exe')) + + +def wix_build(language): + """ Use wix command to build windows msi install package""" + + CULTURE = 'zh-cn' + LANG_FILE = 'zh_CN.wxl' + TARGET = 'seafile.msi' + + if language == 'en': + CULTURE = 'en-us' + LANG_FILE = 'en_US.wxl' + TARGET = 'seafile-en.msi' + + CC = '%s/candle.exe' %(WIX_BIN) + LD = '%s/light.exe' %(WIX_BIN) + + CFLAGS = '-arch "x64" -nologo -ext WixUIExtension -ext WixUtilExtension' + LDFLAGS = '-nologo -spdb -ext WixUIExtension -ext WixUtilExtension' + \ + ' -loc %s -cultures:%s -sice:ICE80' % (LANG_FILE, CULTURE) + + + generator_fragment_cmd = "%s/Paraffin.exe -dir bin -g -alias bin \ + -custom bin fragment.wxs" %(WIX_BIN) + if run(generator_fragment_cmd, cwd=WIX_PACKAGE_DIR) != 0: + error('error wherunning command:\n\t%s\n' % generator_fragment_cmd) + + edit_fragment_wxs() + + build_command = [ + '%s %s WixUI_InstallDir_NoLicense.wxs -o WixUI_InstallDir_NoLicense.wixobj' % (CC, CFLAGS), + '%s %s MyInstallDirDlg.wxs -o MyInstallDirDlg.wixobj' % (CC, CFLAGS), + '%s %s fragment.wxs -o fragment.wixobj' % (CC, CFLAGS), + '%s %s shell.wxs -o shell.wixobj' % (CC, CFLAGS), + '%s %s seafile.wxs -o seafile.wixobj' % (CC, CFLAGS), + '%s %s WixUI_InstallDir_NoLicense.wixobj MyInstallDirDlg.wixobj fragment.wixobj shell.wixobj seafile.wixobj -o %s' %(LD, LDFLAGS, TARGET), + ] + for cmd in build_command: + if run(cmd, cwd=WIX_PACKAGE_DIR) != 0: + error('error when running command:\n\t%s\n' % cmd) + + # Digitally sign the msi package + msi_path = os.path.join(WIX_PACKAGE_DIR, TARGET) + signinstaller(msi_path, language) + + +def prepare_msi(): + if os.path.exists(WIX_PACKAGE_DIR) : + must_rmtree(WIX_PACKAGE_DIR) + + + msi_dir = os.path.join(Seafile().projdir, 'msi') + + # These files are in seafile-shell-ext because they're shared between seafile/seafile + ext_wxi = os.path.join(SeafileShellExt().projdir, 'msi', 'ext.wxi') + must_copy(ext_wxi, msi_dir) + shell_wxs = os.path.join(SeafileShellExt().projdir, 'msi', 'shell.wxs') + must_copy(shell_wxs, msi_dir) + + # Copy msi to wix package directory + if not os.path.exists(WIX_PACKAGE_DIR): + must_copytree(msi_dir, WIX_PACKAGE_DIR) + + + wix_pack_bin = os.path.join(WIX_PACKAGE_DIR, 'bin') + if os.path.exists(wix_pack_bin) : + os.rmdir(wix_pack_bin) + + # Copy vc runtimer merge module + must_copy(os.path.join(OPENSSL_DIR, 'Microsoft_VC142_CRT_x64.msm'), SLNOUTPUTDIR) + + must_copytree(SLNOUTPUTDIR, wix_pack_bin) + + # Copy seafile_ext64.dll to WIX_PACKAGE_DIR/custom + seafile_extension_target_path = os.path.join(SeafileShellExt().projdir, 'extensions', 'x64\\Release', 'seafile_ext64.dll') + seafile_extension_dst_path = os.path.join(WIX_PACKAGE_DIR, 'custom') + must_copy(seafile_extension_target_path, seafile_extension_dst_path) + + # Copy seafile_custom64.dll to WIX_PACKAGE_DIR/custom + seafile_custom_target_path = os.path.join(Seafile().projdir, 'msi\\custom\\x64\\Release', 'seafile_custom64.dll') + must_copy(seafile_custom_target_path, seafile_extension_dst_path) + + +def edit_fragment_wxs(): + '''In the main wxs file(seafile.wxs) we need to reference to the id of + seafile-applet.exe, which is listed in fragment.wxs. Since fragments.wxs is + auto generated, the id is sequentially generated, so we need to change the + id of seafile-applet.exe manually. + + ''' + file_path = os.path.join(WIX_PACKAGE_DIR, 'fragment.wxs') + new_lines = [] + with open(file_path, 'r', encoding='utf-8') as fp: + for line in fp: + if 'seafile-applet.exe' in line: + # change the id of 'seafile-applet.exe' to 'seafileapplet.exe' + new_line = re.sub(r'file_bin_[\d]+', 'seafileapplet.exe', line) + new_lines.append(new_line) + else: + new_lines.append(line) + + content = '\r\n'.join(new_lines) + with open(file_path, 'w', encoding='utf-8') as fp: + fp.write(content) + +def signinstaller(msi_file_path, language): + global version + msi_name = '' + if language != 'cn': + msi_name = 'seafile-{}-{}.msi' .format(version, language) + else: + msi_name = 'seafile-{}.msi' .format(version) + do_sign(CERTFILE, msi_file_path, msi_name) + must_rename(msi_file_path, os.path.join(WIX_PACKAGE_DIR, msi_name)) + + +def build_and_sign_msi(): + prepare_msi() + + # Build seafile msi english and chinese version + wix_build('en') + wix_build('cn') + + +def main(): + check_cmd_para() + + # Construct seafile build folder + initworkspace() + + libsearpc = Libsearpc() + seafile = Seafile() + seafile_gui = SeafileGUI() + seafile_shell_ext = SeafileShellExt() + + # Build Seadrive project + libsearpc.build() + seafile.build() + seafile_gui.build() + seafile_shell_ext.build() + + # Build seafile msi installer use wix + build_and_sign_msi() + + +if __name__ == "__main__": + main() + diff --git a/seafile.sln b/seafile.sln new file mode 100644 index 00000000..417d172a --- /dev/null +++ b/seafile.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29613.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "seafile", "seafile.vcxproj", "{D3B4BCBB-BF84-43DF-9753-A7A0A4288D13}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D3B4BCBB-BF84-43DF-9753-A7A0A4288D13}.Debug|x64.ActiveCfg = Debug|x64 + {D3B4BCBB-BF84-43DF-9753-A7A0A4288D13}.Debug|x64.Build.0 = Debug|x64 + {D3B4BCBB-BF84-43DF-9753-A7A0A4288D13}.Debug|x86.ActiveCfg = Debug|Win32 + {D3B4BCBB-BF84-43DF-9753-A7A0A4288D13}.Debug|x86.Build.0 = Debug|Win32 + {D3B4BCBB-BF84-43DF-9753-A7A0A4288D13}.Release|x64.ActiveCfg = Release|x64 + {D3B4BCBB-BF84-43DF-9753-A7A0A4288D13}.Release|x64.Build.0 = Release|x64 + {D3B4BCBB-BF84-43DF-9753-A7A0A4288D13}.Release|x86.ActiveCfg = Release|Win32 + {D3B4BCBB-BF84-43DF-9753-A7A0A4288D13}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {ACC9413E-DE77-4CF1-9C31-14978D440597} + EndGlobalSection +EndGlobal diff --git a/seafile.vcxproj b/seafile.vcxproj new file mode 100644 index 00000000..fdb2c393 --- /dev/null +++ b/seafile.vcxproj @@ -0,0 +1,276 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + {D3B4BCBB-BF84-43DF-9753-A7A0A4288D13} + seafile + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + false + NotSet + + + Application + true + v142 + NotSet + + + Application + false + v142 + false + NotSet + + + + + + + + + + + + + + + + + + + + + true + seaf-daemon + + + true + seaf-daemon + + + false + seaf-daemon + + + + + seaf-daemon + $(ProjectDir)$(Platform)\$(Configuration)\ + + + + Level3 + + + WIN32;UNICODE;WIN32_LEAN_AND_MEAN;SEAFILE_CLIENT;PACKAGE_VERSION="7.0.9";%(PreprocessorDefinitions) + false + /utf-8 %(AdditionalOptions) + $(ProjectDir)..\libsearpc\lib;$(ProjectDir)common;$(ProjectDir)lib;$(ProjectDir)include;$(ProjectDir)daemon;$(ProjectDir);%(AdditionalIncludeDirectories) + stdcpp17 + + + Console + true + $(ProjectDir)..\libsearpc\$(IntDir);%(AdditionalLibraryDirectories) + ws2_32.lib;Rpcrt4.lib;Psapi.lib;Crypt32.lib;libsearpc.lib;%(AdditionalDependencies) + + + + + Level1 + + + WIN32;UNICODE;WIN32_LEAN_AND_MEAN;SEAFILE_CLIENT;PACKAGE_VERSION="7.0.9";%(PreprocessorDefinitions) + false + stdcpp17 + $(ProjectDir)..\libsearpc\lib;$(ProjectDir)common;$(ProjectDir)include;$(ProjectDir)daemon;$(ProjectDir)lib;$(ProjectDir);%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + + + Console + DebugFastLink + $(ProjectDir)..\libsearpc\$(IntDir);%(AdditionalLibraryDirectories) + ws2_32.lib;Rpcrt4.lib;Psapi.lib;Crypt32.lib;libsearpc.lib;%(AdditionalDependencies) + + + + + Level3 + + + false + + + WIN32;PACKAGE_VERSION="7.0.9";WIN32_LEAN_AND_MEAN;UNICODE;SEAFILE_CLIENT;%(PreprocessorDefinitions) + false + stdcpp17 + $(ProjectDir)..\libsearpc\lib;$(ProjectDir);$(ProjectDir)daemon;$(ProjectDir)include;$(ProjectDir)lib;$(ProjectDir)common;%(AdditionalIncludeDirectories) + true + Disabled + EnableFastChecks + /utf-8 %(AdditionalOptions) + MultiThreadedDLL + + + Console + true + true + DebugFastLink + ws2_32.lib;Psapi.lib;Rpcrt4.lib;Crypt32.lib;libsearpc.lib;%(AdditionalDependencies) + $(ProjectDir)..\libsearpc\Debug;%(AdditionalLibraryDirectories) + + + + + Level1 + + + false + + + WIN32;PACKAGE_VERSION="7.0.9";WIN32_LEAN_AND_MEAN;UNICODE;SEAFILE_CLIENT;%(PreprocessorDefinitions) + false + stdcpp17 + $(ProjectDir)..\libsearpc\lib;$(ProjectDir);$(ProjectDir)common;$(ProjectDir)lib;$(ProjectDir)include;$(ProjectDir)daemon;%(AdditionalIncludeDirectories) + /utf-8 %(AdditionalOptions) + MultiThreadedDLL + + + Console + + + + + true + $(ProjectDir)..\libsearpc\$(IntDir);%(AdditionalLibraryDirectories) + ws2_32.lib;Psapi.lib;Rpcrt4.lib;Crypt32.lib;libsearpc.lib;%(AdditionalDependencies) + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file