1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-08-11 11:42:46 +00:00
seafile-server/server/gc/seafile-session.h
feiniks 49c860b50d
Get nickname use seahub API (#670)
* Get nickname use seahub API

* Add parse site_root

* Use regex to match SECRET_KEY

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-07-30 17:58:18 +08:00

49 lines
1.2 KiB
C

#ifndef SEAFILE_SESSION_H
#define SEAFILE_SESSION_H
#include <stdint.h>
#include <glib.h>
#include "block-mgr.h"
#include "fs-mgr.h"
#include "commit-mgr.h"
#include "branch-mgr.h"
#include "repo-mgr.h"
#include "db.h"
#include "seaf-db.h"
#include "config-mgr.h"
typedef struct _SeafileSession SeafileSession;
struct _SeafileSession {
char *seaf_dir;
char *ccnet_dir;
char *tmp_file_dir;
/* Config that's only loaded on start */
GKeyFile *config;
GKeyFile *ccnet_config;
SeafDB *db;
SeafDB *ccnet_db;
char *seahub_pk;
SeafBlockManager *block_mgr;
SeafFSManager *fs_mgr;
SeafCommitManager *commit_mgr;
SeafBranchManager *branch_mgr;
SeafRepoManager *repo_mgr;
SeafCfgManager *cfg_mgr;
gboolean create_tables;
gboolean ccnet_create_tables;
};
extern SeafileSession *seaf;
SeafileSession *
seafile_session_new(const char *central_config_dir,
const char *seafile_dir,
const char *ccnet_dir,
gboolean need_db);
#endif