~azzar1/snapd-glib-fork/glib-2-40

78 by Robert Ancell
Add some copyright headers
1
/*
2
 * Copyright (C) 2016 Canonical Ltd.
3
 *
4
 * This library is free software; you can redistribute it and/or modify it under
5
 * the terms of the GNU Lesser General Public License as published by the Free
6
 * Software Foundation; either version 2 or version 3 of the License.
7
 * See http://www.gnu.org/copyleft/lgpl.html the full text of the license.
8
 */
9
34 by Robert Ancell
Add interfaces API
10
#ifndef __SNAPD_SLOT_H__
11
#define __SNAPD_SLOT_H__
12
13
#if !defined(__SNAPD_GLIB_INSIDE__) && !defined(SNAPD_COMPILATION)
14
#error "Only <snapd-glib/snapd-glib.h> can be included directly."
15
#endif
16
17
#include <glib-object.h>
38 by Robert Ancell
Add interface connection API
18
#include <snapd-glib/snapd-connection.h>
34 by Robert Ancell
Add interfaces API
19
20
G_BEGIN_DECLS
21
22
#define SNAPD_TYPE_SLOT  (snapd_slot_get_type ())
23
24
G_DECLARE_FINAL_TYPE (SnapdSlot, snapd_slot, SNAPD, SLOT, GObject)
25
26
struct _SnapdSlotClass
27
{
28
    /*< private >*/
29
    GObjectClass parent_class;
30
};
31
167 by Robert Ancell
Add API to get slot/plug attributes
32
const gchar *snapd_slot_get_name            (SnapdSlot   *slot);
33
34
const gchar *snapd_slot_get_snap            (SnapdSlot   *slot);
35
36
const gchar *snapd_slot_get_interface       (SnapdSlot   *slot);
37
38
gchar      **snapd_slot_get_attribute_names (SnapdSlot   *slot,
39
                                             guint       *length);
40
41
gboolean     snapd_slot_has_attribute       (SnapdSlot   *slot,
42
                                             const gchar *name);
43
44
GVariant    *snapd_slot_get_attribute       (SnapdSlot   *slot,
45
                                             const gchar *name);
46
47
const gchar *snapd_slot_get_label           (SnapdSlot   *slot);
48
49
GPtrArray   *snapd_slot_get_connections     (SnapdSlot   *slot);
34 by Robert Ancell
Add interfaces API
50
51
G_END_DECLS
52
53
#endif /* __SNAPD_SLOT_H__ */