2016-08-10 06:53:33 +00:00
|
|
|
#ifndef SEAFILE_SESSION_H
|
|
|
|
#define SEAFILE_SESSION_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
#include <seaf-db.h>
|
|
|
|
|
|
|
|
#include "block-mgr.h"
|
|
|
|
#include "fs-mgr.h"
|
|
|
|
#include "branch-mgr.h"
|
|
|
|
#include "commit-mgr.h"
|
|
|
|
#include "repo-mgr.h"
|
|
|
|
|
|
|
|
typedef struct _SeafileSession SeafileSession;
|
|
|
|
|
|
|
|
struct _SeafileSession {
|
|
|
|
char *seaf_dir;
|
2019-07-01 08:41:41 +00:00
|
|
|
char *ccnet_dir;
|
2016-08-10 06:53:33 +00:00
|
|
|
char *tmp_file_dir;
|
|
|
|
/* Config that's only loaded on start */
|
|
|
|
GKeyFile *config;
|
|
|
|
SeafDB *db;
|
|
|
|
|
|
|
|
SeafBlockManager *block_mgr;
|
|
|
|
SeafFSManager *fs_mgr;
|
|
|
|
SeafBranchManager *branch_mgr;
|
|
|
|
SeafCommitManager *commit_mgr;
|
|
|
|
SeafRepoManager *repo_mgr;
|
2018-07-05 03:58:33 +00:00
|
|
|
|
2019-03-19 08:09:44 +00:00
|
|
|
GHashTable *excluded_users;
|
|
|
|
|
2018-07-05 03:58:33 +00:00
|
|
|
gboolean create_tables;
|
2016-08-10 06:53:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern SeafileSession *seaf;
|
|
|
|
|
|
|
|
SeafileSession *
|
|
|
|
seafile_session_new(const char *central_config_dir,
|
|
|
|
const char *seafile_dir,
|
2019-07-01 08:41:41 +00:00
|
|
|
const char *ccnet_dir);
|
2016-08-10 06:53:33 +00:00
|
|
|
|
|
|
|
int
|
|
|
|
seafile_session_init (SeafileSession *session);
|
|
|
|
|
|
|
|
int
|
|
|
|
seafile_session_start (SeafileSession *session);
|
|
|
|
|
|
|
|
#endif
|