|
hamsterdb Embedded Database
2.1.1
|
00001 /* 00002 * Copyright (C) 2005-2013 Christoph Rupp (chris@crupp.de). 00003 * 00004 * This program is free software; you can redistribute it and/or modify it 00005 * under the terms of the GNU General Public License as published by the 00006 * Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * See files COPYING.* for License information. 00010 */ 00011 00012 #ifndef HAM_HAMSTERDB_SRV_H__ 00013 #define HAM_HAMSTERDB_SRV_H__ 00014 00015 #ifdef __cplusplus 00016 extern "C" { 00017 #endif 00018 00019 #include <ham/hamsterdb.h> 00020 00032 typedef struct { 00034 ham_u16_t port; 00035 00037 const char *access_log_path; 00038 00040 const char *error_log_path; 00041 00042 } ham_srv_config_t; 00043 00047 struct ham_srv_t; 00048 typedef struct ham_srv_t ham_srv_t; 00049 00063 extern ham_status_t 00064 ham_srv_init(ham_srv_config_t *config, ham_srv_t **srv); 00065 00086 extern ham_status_t 00087 ham_srv_add_env(ham_srv_t *srv, ham_env_t *env, const char *urlname); 00088 00089 /* 00090 * Release memory and clean up 00091 * 00092 * @param srv A valid ham_srv_t handle 00093 * 00094 * @warning 00095 * This function will not close open handles (i.e. of Databases, Cursors 00096 * or Transactions). The caller has to close the remaining Environment 00097 * handles (@see ham_env_close). 00098 */ 00099 extern void 00100 ham_srv_close(ham_srv_t *srv); 00101 00107 #ifdef __cplusplus 00108 } // extern "C" 00109 #endif 00110 00111 #endif /* HAM_HAMSTERDB_SRV_H__ */
1.7.6.1