Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
mongo_client_manager.h
Go to the documentation of this file.
1 /*
2 ** Copyright 2014-2016 The Earlham Institute
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
16 
27 #ifndef CORE_SERVER_MONGODB_INCLUDE_MONGO_CLIENT_MANAGER_H_
28 #define CORE_SERVER_MONGODB_INCLUDE_MONGO_CLIENT_MANAGER_H_
29 
30 #include "typedefs.h"
31 #include "mongodb_library.h"
32 #include "grassroots_server.h"
33 
34 /* forward declarations */
35 struct MongoClientManager;
36 struct _mongoc_client_t;
37 
38 
39 
40 
41 
42 #ifdef __cplusplus
43 extern "C"
44 {
45 #endif
46 
47 
48 
49 GRASSROOTS_MONGODB_API struct MongoClientManager *AllocateMongoClientManager (const char *uri_s);
50 
51 
52 GRASSROOTS_MONGODB_API void FreeMongoClientManager (struct MongoClientManager *manager_p);
53 
54 
55 GRASSROOTS_MONGODB_API struct _mongoc_client_t *GetMongoClientFromMongoClientManager (struct MongoClientManager *manager_p);
56 
57 
58 GRASSROOTS_MONGODB_API void ReleaseMongoClientFromMongoClientManager (struct MongoClientManager *manager_p, struct _mongoc_client_t *client_p);
59 
60 
61 #ifdef __cplusplus
62 }
63 #endif
64 
65 
66 #endif /* CORE_SERVER_MONGODB_INCLUDE_MONGO_CLIENT_MANAGER_H_ */
ReleaseMongoClientFromMongoClientManager
void ReleaseMongoClientFromMongoClientManager(struct MongoClientManager *manager_p, struct _mongoc_client_t *client_p)
GRASSROOTS_MONGODB_API
#define GRASSROOTS_MONGODB_API
Definition: mongodb_library.h:46
grassroots_server.h
GetMongoClientFromMongoClientManager
struct _mongoc_client_t * GetMongoClientFromMongoClientManager(struct MongoClientManager *manager_p)
typedefs.h
AllocateMongoClientManager
struct MongoClientManager * AllocateMongoClientManager(const char *uri_s)
mongodb_library.h
FreeMongoClientManager
void FreeMongoClientManager(struct MongoClientManager *manager_p)