Ubuntu Platform API 3.0.0
A library helping with tight integration into the Ubuntu platform
archive.h
Go to the documentation of this file.
1/*
2 * Copyright © 2013 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Ricardo Mendoza <ricardo.mendoza@canonical.com>
17 * Thomas Voß <thomas.voss@canonical.com>
18 */
19
20#ifndef UBUNTU_APPLICATION_ARCHIVE_H_
21#define UBUNTU_APPLICATION_ARCHIVE_H_
22
23#include <ubuntu/status.h>
24#include <ubuntu/visibility.h>
25
26#include <stdint.h>
27#include <stddef.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33typedef struct UbuntuApplicationArchive_ UApplicationArchive;
34
43
52 UApplicationArchive *archive);
53
63 UApplicationArchive *archive,
64 int64_t s);
65
76 UApplicationArchive *archive,
77 const char *s,
78 size_t size);
79
90 UApplicationArchive *archive,
91 const wchar_t *s,
92 size_t size);
93
104 UApplicationArchive *archive,
105 const intptr_t *data,
106 size_t size);
107
110 UApplicationArchive* archive,
111 const char *name,
112 size_t size);
113
116 UApplicationArchive* archive,
117 const char *name,
118 size_t size);
119
129 const UApplicationArchive *archive,
130 int64_t *s);
131
142 const UApplicationArchive *archive,
143 const char **s,
144 size_t *size);
145
156 UApplicationArchive *archive,
157 const wchar_t *s,
158 size_t size);
159
170 UApplicationArchive *archive,
171 const intptr_t *data,
172 size_t size);
173
174#ifdef __cplusplus
175}
176#endif
177
178#endif /* UBUNTU_APPLICATION_ARCHIVE_H_ */
UBUNTU_DLL_PUBLIC UStatus u_application_archive_write_begin_blockn(UApplicationArchive *archive, const char *name, size_t size)
UBUNTU_DLL_PUBLIC UStatus u_application_archive_write_end_blockn(UApplicationArchive *archive, const char *name, size_t size)
struct UbuntuApplicationArchive_ UApplicationArchive
Definition: archive.h:33
UBUNTU_DLL_PUBLIC void u_application_archive_destroy(UApplicationArchive *archive)
Destroys the given archive instance and releases all resources held by the instance.
UBUNTU_DLL_PUBLIC UStatus u_application_archive_write_wstringn(UApplicationArchive *archive, const wchar_t *s, size_t size)
Writes a string of wide characters to the supplied archive.
UBUNTU_DLL_PUBLIC UApplicationArchive * u_application_archive_new()
Creates a new archive, ownership is transferred to caller.
UBUNTU_DLL_PUBLIC UStatus u_application_archive_write(UApplicationArchive *archive, int64_t s)
Writes a signed 64-bit integer to the supplied archive.
UBUNTU_DLL_PUBLIC UStatus u_application_archive_read_bytes(UApplicationArchive *archive, const intptr_t *data, size_t size)
Reads a blob of binary data from the supplied archive.
UBUNTU_DLL_PUBLIC UStatus u_application_archive_write_stringn(UApplicationArchive *archive, const char *s, size_t size)
Writes a string of characters to the supplied archive.
UBUNTU_DLL_PUBLIC UStatus u_application_archive_read(const UApplicationArchive *archive, int64_t *s)
Reads a signed 64-bit integer from the supplied archive.
UBUNTU_DLL_PUBLIC UStatus u_application_archive_read_wstringn(UApplicationArchive *archive, const wchar_t *s, size_t size)
Reads a string of wide characters from the supplied archive.
UBUNTU_DLL_PUBLIC UStatus u_application_archive_read_stringn(const UApplicationArchive *archive, const char **s, size_t *size)
Reads a string of characters from the supplied archive.
UBUNTU_DLL_PUBLIC UStatus u_application_archive_write_bytes(UApplicationArchive *archive, const intptr_t *data, size_t size)
Writes a blob of binary data to the supplied archive.
UbuntuStatus
Indicates the status of an operation.
Definition: status.h:27
#define UBUNTU_DLL_PUBLIC
Definition: visibility.h:26