1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-06-30 17:01:51 +00:00
seafile-server/server/seafile-session.h

101 lines
2.4 KiB
C
Raw Normal View History

2016-08-10 06:53:33 +00:00
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef SEAFILE_SESSION_H
#define SEAFILE_SESSION_H
#include <ccnet.h>
#include <ccnet/cevent.h>
#include <ccnet/job-mgr.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 "mq-mgr.h"
2016-08-10 06:53:33 +00:00
#include "share-mgr.h"
#include "web-accesstoken-mgr.h"
#include "passwd-mgr.h"
#include "quota-mgr.h"
#include "size-sched.h"
#include "copy-mgr.h"
#include "config-mgr.h"
2016-08-10 06:53:33 +00:00
#include "http-server.h"
#include "zip-download-mgr.h"
#include "index-blocks-mgr.h"
2016-08-10 06:53:33 +00:00
#include <searpc-client.h>
struct _CcnetClient;
typedef struct _SeafileSession SeafileSession;
struct _SeafileSession {
char *central_config_dir;
char *seaf_dir;
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;
SeafCommitManager *commit_mgr;
SeafBranchManager *branch_mgr;
SeafRepoManager *repo_mgr;
SeafShareManager *share_mgr;
SeafPasswdManager *passwd_mgr;
SeafQuotaManager *quota_mgr;
SeafCopyManager *copy_mgr;
SeafCfgManager *cfg_mgr;
2016-08-10 06:53:33 +00:00
SeafWebAccessTokenManager *web_at_mgr;
SeafMqManager *mq_mgr;
2016-08-10 06:53:33 +00:00
CcnetJobManager *job_mgr;
SizeScheduler *size_sched;
int cloud_mode;
HttpServerStruct *http_server;
ZipDownloadMgr *zip_download_mgr;
IndexBlksMgr *index_blocks_mgr;
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,
const char *ccnet_dir);
2016-08-10 06:53:33 +00:00
int
seafile_session_init (SeafileSession *session);
int
seafile_session_start (SeafileSession *session);
char *
seafile_session_get_tmp_file_path (SeafileSession *session,
const char *basename,
char path[]);
void
schedule_create_system_default_repo (SeafileSession *session);
char *
get_system_default_repo_id (SeafileSession *session);
int
set_system_default_repo_id (SeafileSession *session, const char *repo_id);
#endif /* SEAFILE_H */