This file is indexed.

/usr/include/libvirt-gobject-1.0/libvirt-gobject/libvirt-gobject-connection.h is in libvirt-glib-1.0-dev 0.2.2-0.1ubuntu1.

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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
/*
 * libvirt-gobject-connection.h: libvirt gobject integration
 *
 * Copyright (C) 2010-2011 Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see
 * <http://www.gnu.org/licenses/>.
 *
 * Author: Daniel P. Berrange <berrange@redhat.com>
 */

#if !defined(__LIBVIRT_GOBJECT_H__) && !defined(LIBVIRT_GOBJECT_BUILD)
#error "Only <libvirt-gobject/libvirt-gobject.h> can be included directly."
#endif

#ifndef __LIBVIRT_GOBJECT_CONNECTION_H__
#define __LIBVIRT_GOBJECT_CONNECTION_H__

G_BEGIN_DECLS

#define GVIR_TYPE_CONNECTION            (gvir_connection_get_type ())
#define GVIR_CONNECTION(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GVIR_TYPE_CONNECTION, GVirConnection))
#define GVIR_CONNECTION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GVIR_TYPE_CONNECTION, GVirConnectionClass))
#define GVIR_IS_CONNECTION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GVIR_TYPE_CONNECTION))
#define GVIR_IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GVIR_TYPE_CONNECTION))
#define GVIR_CONNECTION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GVIR_TYPE_CONNECTION, GVirConnectionClass))

#define GVIR_TYPE_CONNECTION_HANDLE      (gvir_connection_handle_get_type ())

typedef struct _GVirNodeInfo GVirNodeInfo;
struct _GVirNodeInfo
{
    gchar model[32]; /* string indicating the CPU model */
    gulong memory;   /* memory size in kilobytes */
    guint cpus;      /* the number of active CPUs */
    guint mhz;       /* expected CPU frequency */
    guint nodes;     /* the number of NUMA cell, 1 for unusual NUMA topologies or uniform memo */
    guint sockets;   /* number of CPU sockets per node if nodes > 1, total number of CPU socke */
    guint cores;     /* number of cores per socket */
    guint threads;   /* number of threads per core */
};

typedef struct _GVirConnection GVirConnection;
typedef struct _GVirConnectionPrivate GVirConnectionPrivate;
typedef struct _GVirConnectionClass GVirConnectionClass;

struct _GVirConnection
{
    GObject parent;

    GVirConnectionPrivate *priv;

    /* Do not add fields to this struct */
};

struct _GVirConnectionClass
{
    GObjectClass parent_class;

    /* signals */
    void (*connection_opened)(GVirConnection *conn);
    void (*connection_closed)(GVirConnection *conn);

    void (*domain_added)(GVirConnection *conn, GVirDomain *dom);
    void (*domain_removed)(GVirConnection *conn, GVirDomain *dom);

    GVirStream *(*stream_new)(GVirConnection *conn, gpointer handle);

    gpointer padding[20];
};

GType gvir_connection_get_type(void);
GType gvir_connection_handle_get_type(void);
GType gvir_node_info_get_type(void);

GVirConnection *gvir_connection_new(const char *uri);
gboolean gvir_connection_open(GVirConnection *conn,
                              GCancellable *cancellable,
                              GError **err);
gboolean gvir_connection_open_read_only(GVirConnection *conn,
                                        GCancellable *cancellable,
                                        GError **err);
void gvir_connection_open_async(GVirConnection *conn,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);
gboolean gvir_connection_open_finish(GVirConnection *conn,
                                     GAsyncResult *result,
                                     GError **err);
void gvir_connection_open_read_only_async(GVirConnection *conn,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer user_data);
gboolean gvir_connection_open_read_only_finish(GVirConnection *conn,
                                               GAsyncResult *result,
                                               GError **err);
gboolean gvir_connection_is_open(GVirConnection *conn);
gboolean gvir_connection_is_read_only(GVirConnection *conn);
void gvir_connection_close(GVirConnection *conn);

gboolean gvir_connection_fetch_domains(GVirConnection *conn,
                                       GCancellable *cancellable,
                                       GError **err);
void gvir_connection_fetch_domains_async(GVirConnection *conn,
                                         GCancellable *cancellable,
                                         GAsyncReadyCallback callback,
                                         gpointer user_data);
gboolean gvir_connection_fetch_domains_finish(GVirConnection *conn,
                                              GAsyncResult *result,
                                              GError **err);


const gchar *gvir_connection_get_uri(GVirConnection *conn);

gchar *gvir_connection_get_hypervisor_name(GVirConnection *conn,
                                           GError **err);
gulong gvir_connection_get_version(GVirConnection *conn,
                                   GError **err);

GList *gvir_connection_get_domains(GVirConnection *conn);
GVirDomain *gvir_connection_get_domain(GVirConnection *conn,
                                       const gchar *uuid);
GVirDomain *gvir_connection_find_domain_by_id(GVirConnection *conn,
                                              gint id);
GVirDomain *gvir_connection_find_domain_by_name(GVirConnection *conn,
                                                const gchar *name);

GVirDomain *gvir_connection_create_domain(GVirConnection *conn,
                                          GVirConfigDomain *conf,
                                          GError **err);
GVirDomain *gvir_connection_start_domain(GVirConnection *conn,
                                         GVirConfigDomain *conf,
                                         guint flags,
                                         GError **err);

gboolean gvir_connection_fetch_interfaces(GVirConnection *conn,
                                          GCancellable *cancellable,
                                          GError **err);
void gvir_connection_fetch_interfaces_async(GVirConnection *conn,
                                            GCancellable *cancellable,
                                            GAsyncReadyCallback callback,
                                            gpointer user_data);
gboolean gvir_connection_fetch_interfaces_finish(GVirConnection *conn,
                                                 GAsyncResult *result,
                                                 GError **err);
GList *gvir_connection_get_interfaces(GVirConnection *conn);
GVirInterface *gvir_connection_get_interface(GVirConnection *conn,
                                             const gchar *name);
GVirInterface *gvir_connection_find_interface_by_mac(GVirConnection *conn,
                                                     const gchar *macaddr);

gboolean gvir_connection_fetch_networks(GVirConnection *conn,
                                          GCancellable *cancellable,
                                          GError **err);
void gvir_connection_fetch_networks_async(GVirConnection *conn,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer user_data);
gboolean gvir_connection_fetch_networks_finish(GVirConnection *conn,
                                               GAsyncResult *result,
                                               GError **err);
GList *gvir_connection_get_networks(GVirConnection *conn);
GVirNetwork *gvir_connection_get_network(GVirConnection *conn,
                                         const gchar *uuid);
GVirNetwork *gvir_connection_find_network_by_name(GVirConnection *conn,
                                                  const gchar *name);

#if 0
GList *gvir_connection_get_network_filters(GVirConnection *conn);
GVirNetworkFilter *gvir_connection_get_network_filter(GVirConnection *conn,
                                                      const gchar *uuid);
GVirNetworkFilter *gvir_connection_find_network_filter_by_name(GVirConnection *conn,
                                                               const gchar *name);


GList *gvir_connection_get_node_devices(GVirConnection *conn);
GVirNodeDevice *gvir_connection_get_node_device(GVirConnection *conn,
                                                const gchar *name);


GList *gvir_connection_get_secrets(GVirConnection *conn);
GVirSecret *gvir_connection_get_secret(GVirConnection *conn,
                                       const gchar *uuid);
#endif

gboolean gvir_connection_fetch_storage_pools(GVirConnection *conn,
                                             GCancellable *cancellable,
                                             GError **err);
void gvir_connection_fetch_storage_pools_async(GVirConnection *conn,
                                               GCancellable *cancellable,
                                               GAsyncReadyCallback callback,
                                               gpointer user_data);
gboolean gvir_connection_fetch_storage_pools_finish(GVirConnection *conn,
                                                    GAsyncResult *result,
                                                    GError **err);

GList *gvir_connection_get_storage_pools(GVirConnection *conn);
GVirStoragePool *gvir_connection_get_storage_pool(GVirConnection *conn,
                                                  const gchar *uuid);
GVirStoragePool *gvir_connection_find_storage_pool_by_name(GVirConnection *conn,
                                                           const gchar *name);

GVirStoragePool *gvir_connection_create_storage_pool
                                (GVirConnection *conn,
                                 GVirConfigStoragePool *conf,
                                 guint flags,
                                 GError **err);


GVirStream *gvir_connection_get_stream(GVirConnection *conn,
                                       guint flags);

GVirNodeInfo *gvir_connection_get_node_info(GVirConnection *conn,
                                            GError **err);

GVirConfigCapabilities *gvir_connection_get_capabilities(GVirConnection *conn,
                                                         GError **err);
void gvir_connection_get_capabilities_async(GVirConnection *conn,
                                            GCancellable *cancellable,
                                            GAsyncReadyCallback callback,
                                            gpointer user_data);
GVirConfigCapabilities *
gvir_connection_get_capabilities_finish(GVirConnection *conn,
                                        GAsyncResult *result,
                                        GError **err);

gboolean
gvir_connection_restore_domain_from_file(GVirConnection *conn,
                                         gchar *filename,
                                         GVirConfigDomain *custom_conf,
                                         guint flags,
                                         GError **err);

void
gvir_connection_restore_domain_from_file_async(GVirConnection *conn,
                                               gchar *filename,
                                               GVirConfigDomain *custom_conf,
                                               guint flags,
                                               GCancellable *cancellable,
                                               GAsyncReadyCallback callback,
                                               gpointer user_data);

gboolean
gvir_connection_restore_domain_from_file_finish(GVirConnection *conn,
                                                GAsyncResult *result,
                                                GError **err);
G_END_DECLS

#endif /* __LIBVIRT_GOBJECT_CONNECTION_H__ */