|
16 | 16 |
|
17 | 17 |
|
18 | 18 | #if !defined (MONGOC_INSIDE) && !defined (MONGOC_COMPILATION)
|
19 |
| -#error "Only <mongoc.h> can be included directly." |
| 19 | +# error "Only <mongoc.h> can be included directly." |
20 | 20 | #endif
|
21 | 21 |
|
22 | 22 |
|
|
33 | 33 | #include "mongoc-gridfs.h"
|
34 | 34 | #include "mongoc-index.h"
|
35 | 35 | #include "mongoc-read-prefs.h"
|
| 36 | +#ifdef MONGOC_ENABLE_SSL |
| 37 | +# include "mongoc-ssl.h" |
| 38 | +#endif |
36 | 39 | #include "mongoc-stream.h"
|
37 | 40 | #include "mongoc-uri.h"
|
38 | 41 | #include "mongoc-write-concern.h"
|
39 | 42 |
|
40 |
| -#ifdef MONGOC_ENABLE_SSL |
41 |
| -#include "mongoc-ssl.h" |
42 |
| -#endif |
43 |
| - |
44 | 43 |
|
45 | 44 | BSON_BEGIN_DECLS
|
46 | 45 |
|
@@ -76,79 +75,48 @@ typedef mongoc_stream_t *(*mongoc_stream_initiator_t) (const mongoc_uri_t
|
76 | 75 | bson_error_t *error);
|
77 | 76 |
|
78 | 77 |
|
79 |
| -mongoc_client_t * |
80 |
| -mongoc_client_new (const char *uri_string); |
81 |
| - |
82 |
| -mongoc_client_t * |
83 |
| -mongoc_client_new_from_uri (const mongoc_uri_t *uri); |
84 |
| - |
85 |
| -const mongoc_uri_t * |
86 |
| -mongoc_client_get_uri (const mongoc_client_t *client); |
87 |
| - |
88 |
| -void |
89 |
| -mongoc_client_set_stream_initiator (mongoc_client_t *client, |
90 |
| - mongoc_stream_initiator_t initiator, |
91 |
| - void *user_data); |
92 |
| - |
93 |
| -mongoc_cursor_t * |
94 |
| -mongoc_client_command (mongoc_client_t *client, |
95 |
| - const char *db_name, |
96 |
| - mongoc_query_flags_t flags, |
97 |
| - uint32_t skip, |
98 |
| - uint32_t limit, |
99 |
| - uint32_t batch_size, |
100 |
| - const bson_t *query, |
101 |
| - const bson_t *fields, |
102 |
| - const mongoc_read_prefs_t *read_prefs); |
103 |
| - |
104 |
| -bool |
105 |
| -mongoc_client_command_simple (mongoc_client_t *client, |
106 |
| - const char *db_name, |
107 |
| - const bson_t *command, |
108 |
| - const mongoc_read_prefs_t *read_prefs, |
109 |
| - bson_t *reply, |
110 |
| - bson_error_t *error); |
111 |
| - |
112 |
| -void |
113 |
| -mongoc_client_destroy (mongoc_client_t *client); |
114 |
| - |
115 |
| -mongoc_database_t * |
116 |
| -mongoc_client_get_database (mongoc_client_t *client, |
117 |
| - const char *name); |
118 |
| - |
119 |
| -mongoc_gridfs_t * |
120 |
| -mongoc_client_get_gridfs (mongoc_client_t *client, |
121 |
| - const char *db, |
122 |
| - const char *prefix, |
123 |
| - bson_error_t *error); |
124 |
| - |
125 |
| -mongoc_collection_t * |
126 |
| -mongoc_client_get_collection (mongoc_client_t *client, |
127 |
| - const char *db, |
128 |
| - const char *collection); |
129 |
| - |
130 |
| -char ** |
131 |
| -mongoc_client_get_database_names (mongoc_client_t *client, |
132 |
| - bson_error_t *error); |
133 |
| - |
134 |
| -const mongoc_write_concern_t * |
135 |
| -mongoc_client_get_write_concern (const mongoc_client_t *client); |
136 |
| - |
137 |
| -void |
138 |
| -mongoc_client_set_write_concern (mongoc_client_t *client, |
139 |
| - const mongoc_write_concern_t *write_concern); |
140 |
| - |
141 |
| -const mongoc_read_prefs_t * |
142 |
| -mongoc_client_get_read_prefs (const mongoc_client_t *client); |
143 |
| - |
144 |
| -void |
145 |
| -mongoc_client_set_read_prefs (mongoc_client_t *client, |
146 |
| - const mongoc_read_prefs_t *read_prefs); |
147 |
| - |
| 78 | +mongoc_client_t *mongoc_client_new (const char *uri_string); |
| 79 | +mongoc_client_t *mongoc_client_new_from_uri (const mongoc_uri_t *uri); |
| 80 | +const mongoc_uri_t *mongoc_client_get_uri (const mongoc_client_t *client); |
| 81 | +void mongoc_client_set_stream_initiator (mongoc_client_t *client, |
| 82 | + mongoc_stream_initiator_t initiator, |
| 83 | + void *user_data); |
| 84 | +mongoc_cursor_t *mongoc_client_command (mongoc_client_t *client, |
| 85 | + const char *db_name, |
| 86 | + mongoc_query_flags_t flags, |
| 87 | + uint32_t skip, |
| 88 | + uint32_t limit, |
| 89 | + uint32_t batch_size, |
| 90 | + const bson_t *query, |
| 91 | + const bson_t *fields, |
| 92 | + const mongoc_read_prefs_t *read_prefs); |
| 93 | +bool mongoc_client_command_simple (mongoc_client_t *client, |
| 94 | + const char *db_name, |
| 95 | + const bson_t *command, |
| 96 | + const mongoc_read_prefs_t *read_prefs, |
| 97 | + bson_t *reply, |
| 98 | + bson_error_t *error); |
| 99 | +void mongoc_client_destroy (mongoc_client_t *client); |
| 100 | +mongoc_database_t *mongoc_client_get_database (mongoc_client_t *client, |
| 101 | + const char *name); |
| 102 | +mongoc_gridfs_t *mongoc_client_get_gridfs (mongoc_client_t *client, |
| 103 | + const char *db, |
| 104 | + const char *prefix, |
| 105 | + bson_error_t *error); |
| 106 | +mongoc_collection_t *mongoc_client_get_collection (mongoc_client_t *client, |
| 107 | + const char *db, |
| 108 | + const char *collection); |
| 109 | +char **mongoc_client_get_database_names (mongoc_client_t *client, |
| 110 | + bson_error_t *error); |
| 111 | +const mongoc_write_concern_t *mongoc_client_get_write_concern (const mongoc_client_t *client); |
| 112 | +void mongoc_client_set_write_concern (mongoc_client_t *client, |
| 113 | + const mongoc_write_concern_t *write_concern); |
| 114 | +const mongoc_read_prefs_t *mongoc_client_get_read_prefs (const mongoc_client_t *client); |
| 115 | +void mongoc_client_set_read_prefs (mongoc_client_t *client, |
| 116 | + const mongoc_read_prefs_t *read_prefs); |
148 | 117 | #ifdef MONGOC_ENABLE_SSL
|
149 |
| -void |
150 |
| -mongoc_client_set_ssl_opts (mongoc_client_t *client, |
151 |
| - const mongoc_ssl_opt_t *opts); |
| 118 | +void mongoc_client_set_ssl_opts (mongoc_client_t *client, |
| 119 | + const mongoc_ssl_opt_t *opts); |
152 | 120 | #endif
|
153 | 121 |
|
154 | 122 |
|
|
0 commit comments