This file is indexed.

/usr/include/libmongoc-1.0/mongoc-database.h is in libmongoc-dev 1.9.2+dfsg-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/*
 * Copyright 2013 MongoDB, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef MONGOC_DATABASE_H
#define MONGOC_DATABASE_H

#if !defined(MONGOC_INSIDE) && !defined(MONGOC_COMPILATION)
#error "Only <mongoc.h> can be included directly."
#endif

#include <bson.h>

#include "mongoc-macros.h"
#include "mongoc-cursor.h"
#include "mongoc-flags.h"
#include "mongoc-read-prefs.h"
#include "mongoc-read-concern.h"
#include "mongoc-write-concern.h"

BSON_BEGIN_DECLS


typedef struct _mongoc_database_t mongoc_database_t;


MONGOC_EXPORT (const char *)
mongoc_database_get_name (mongoc_database_t *database);
MONGOC_EXPORT (bool)
mongoc_database_remove_user (mongoc_database_t *database,
                             const char *username,
                             bson_error_t *error);
MONGOC_EXPORT (bool)
mongoc_database_remove_all_users (mongoc_database_t *database,
                                  bson_error_t *error);
MONGOC_EXPORT (bool)
mongoc_database_add_user (mongoc_database_t *database,
                          const char *username,
                          const char *password,
                          const bson_t *roles,
                          const bson_t *custom_data,
                          bson_error_t *error);
MONGOC_EXPORT (void)
mongoc_database_destroy (mongoc_database_t *database);
MONGOC_EXPORT (mongoc_database_t *)
mongoc_database_copy (mongoc_database_t *database);
MONGOC_EXPORT (mongoc_cursor_t *)
mongoc_database_command (mongoc_database_t *database,
                         mongoc_query_flags_t flags,
                         uint32_t skip,
                         uint32_t limit,
                         uint32_t batch_size,
                         const bson_t *command,
                         const bson_t *fields,
                         const mongoc_read_prefs_t *read_prefs);
MONGOC_EXPORT (bool)
mongoc_database_read_command_with_opts (mongoc_database_t *database,
                                        const bson_t *command,
                                        const mongoc_read_prefs_t *read_prefs,
                                        const bson_t *opts,
                                        bson_t *reply,
                                        bson_error_t *error);
MONGOC_EXPORT (bool)
mongoc_database_write_command_with_opts (mongoc_database_t *database,
                                         const bson_t *command,
                                         const bson_t *opts,
                                         bson_t *reply,
                                         bson_error_t *error);
MONGOC_EXPORT (bool)
mongoc_database_read_write_command_with_opts (
   mongoc_database_t *database,
   const bson_t *command,
   const mongoc_read_prefs_t *read_prefs /* IGNORED */,
   const bson_t *opts,
   bson_t *reply,
   bson_error_t *error);
MONGOC_EXPORT (bool)
mongoc_database_command_with_opts (mongoc_database_t *database,
                                   const bson_t *command,
                                   const mongoc_read_prefs_t *read_prefs,
                                   const bson_t *opts,
                                   bson_t *reply,
                                   bson_error_t *error);
MONGOC_EXPORT (bool)
mongoc_database_command_simple (mongoc_database_t *database,
                                const bson_t *command,
                                const mongoc_read_prefs_t *read_prefs,
                                bson_t *reply,
                                bson_error_t *error);
MONGOC_EXPORT (bool)
mongoc_database_drop (mongoc_database_t *database, bson_error_t *error);
MONGOC_EXPORT (bool)
mongoc_database_drop_with_opts (mongoc_database_t *database,
                                const bson_t *opts,
                                bson_error_t *error);
MONGOC_EXPORT (bool)
mongoc_database_has_collection (mongoc_database_t *database,
                                const char *name,
                                bson_error_t *error);
MONGOC_EXPORT (mongoc_collection_t *)
mongoc_database_create_collection (mongoc_database_t *database,
                                   const char *name,
                                   const bson_t *options,
                                   bson_error_t *error);
MONGOC_EXPORT (const mongoc_read_prefs_t *)
mongoc_database_get_read_prefs (const mongoc_database_t *database);
MONGOC_EXPORT (void)
mongoc_database_set_read_prefs (mongoc_database_t *database,
                                const mongoc_read_prefs_t *read_prefs);
MONGOC_EXPORT (const mongoc_write_concern_t *)
mongoc_database_get_write_concern (const mongoc_database_t *database);
MONGOC_EXPORT (void)
mongoc_database_set_write_concern (mongoc_database_t *database,
                                   const mongoc_write_concern_t *write_concern);
MONGOC_EXPORT (const mongoc_read_concern_t *)
mongoc_database_get_read_concern (const mongoc_database_t *database);
MONGOC_EXPORT (void)
mongoc_database_set_read_concern (mongoc_database_t *database,
                                  const mongoc_read_concern_t *read_concern);
MONGOC_EXPORT (mongoc_cursor_t *)
mongoc_database_find_collections (mongoc_database_t *database,
                                  const bson_t *filter,
                                  bson_error_t *error)
   BSON_GNUC_DEPRECATED_FOR (mongoc_database_find_collections_with_opts);
MONGOC_EXPORT (mongoc_cursor_t *)
mongoc_database_find_collections_with_opts (mongoc_database_t *database,
                                            const bson_t *opts);
MONGOC_EXPORT (char **)
mongoc_database_get_collection_names (mongoc_database_t *database,
                                      bson_error_t *error)
   BSON_GNUC_DEPRECATED_FOR (mongoc_database_get_collection_names_with_opts);
MONGOC_EXPORT (char **)
mongoc_database_get_collection_names_with_opts (mongoc_database_t *database,
                                                const bson_t *opts,
                                                bson_error_t *error);
MONGOC_EXPORT (mongoc_collection_t *)
mongoc_database_get_collection (mongoc_database_t *database, const char *name);

BSON_END_DECLS


#endif /* MONGOC_DATABASE_H */