Debian Codegraph @

lib/packagekit-glib2/pk-client-helper.h

raw
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2010 Richard Hughes <[email protected]>
4 *
5 * Licensed under the GNU Lesser General Public License Version 2.1
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 #if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
23 #error "Only <packagekit.h> can be included directly."
24 #endif
25
26 #ifndef __PK_CLIENT_HELPER_H
27 #define __PK_CLIENT_HELPER_H
28
29 #include <glib-object.h>
30 #include <gio/gio.h>
31
32 #include <packagekit-glib2/pk-source.h>
33 #include <packagekit-glib2/pk-enum.h>
34
35 G_BEGIN_DECLS
36
37 #define PK_TYPE_CLIENT_HELPER (pk_client_helper_get_type ())
38 #define PK_CLIENT_HELPER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_CLIENT_HELPER, PkClientHelper))
39 #define PK_CLIENT_HELPER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_CLIENT_HELPER, PkClientHelperClass))
40 #define PK_IS_CLIENT_HELPER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_CLIENT_HELPER))
41 #define PK_IS_CLIENT_HELPER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_CLIENT_HELPER))
42 #define PK_CLIENT_HELPER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_CLIENT_HELPER, PkClientHelperClass))
43
44 typedef struct _PkClientHelperPrivate PkClientHelperPrivate;
45 typedef struct _PkClientHelper PkClientHelper;
46 typedef struct _PkClientHelperClass PkClientHelperClass;
47
48 struct _PkClientHelper
49 {
50 GObject parent;
51 PkClientHelperPrivate *priv;
52 };
53
54 struct _PkClientHelperClass
55 {
56 GObjectClass parent_class;
57 /* padding for future expansion */
58 void (*_pk_reserved1) (void);
59 void (*_pk_reserved2) (void);
60 void (*_pk_reserved3) (void);
61 void (*_pk_reserved4) (void);
62 void (*_pk_reserved5) (void);
63 };
64
65 GType pk_client_helper_get_type (void);
66 PkClientHelper *pk_client_helper_new (void);
67
68 gboolean pk_client_helper_stop (PkClientHelper *client_helper,
69 GError **error);
70 gboolean pk_client_helper_start (PkClientHelper *client_helper,
71 const gchar *socket_filename,
72 gchar **argv,
73 gchar **envp,
74 GError **error);
75 gboolean pk_client_helper_start_with_socket (PkClientHelper *client_helper,
76 GSocket *socket,
77 gchar **argv,
78 gchar **envp,
79 GError **error);
80
81
82 gboolean pk_client_helper_is_active (PkClientHelper *client_helper);
83
84 G_END_DECLS
85
86 #endif /* __PK_CLIENT_HELPER_H */
87