Debian Codegraph @

lib/packagekit-glib2/pk-package-id.h

raw
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2007-2008 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_PACKAGE_ID_H
27 #define __PK_PACKAGE_ID_H
28
29 #include <glib.h>
30
31 G_BEGIN_DECLS
32
33 /**
34 * PK_PACKAGE_ID_NAME:
35 *
36 * Alias to get a name field from the result of pk_package_id_split
37 */
38 #define PK_PACKAGE_ID_NAME 0
39
40 /**
41 * PK_PACKAGE_ID_VERSION:
42 *
43 * Alias to get a version field from the result of pk_package_id_split
44 */
45 #define PK_PACKAGE_ID_VERSION 1
46
47 /**
48 * PK_PACKAGE_ID_ARCH:
49 *
50 * Alias to get an arch field from the result of pk_package_id_split
51 */
52 #define PK_PACKAGE_ID_ARCH 2
53
54 /**
55 * PK_PACKAGE_ID_DATA:
56 *
57 * Alias to get a data field from the result of pk_package_id_split
58 */
59 #define PK_PACKAGE_ID_DATA 3
60
61 gchar *pk_package_id_build (const gchar *name,
62 const gchar *version,
63 const gchar *arch,
64 const gchar *data);
65 gboolean pk_package_id_check (const gchar *package_id);
66 gchar **pk_package_id_split (const gchar *package_id);
67 gchar *pk_package_id_to_printable (const gchar *package_id);
68 gboolean pk_package_id_equal_fuzzy_arch (const gchar *package_id1,
69 const gchar *package_id2);
70 G_END_DECLS
71
72 #endif /* __PK_PACKAGE_ID_H */
73