archive.h
Go to the documentation of this file.
/*
* Copyright © 2013 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3 as
* published by the Free Software Foundation.
*
* This program 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 program. If not, see <http://www.gnu.org/licenses/>.
*
* Authored by: Ricardo Mendoza <ricardo.mendoza@canonical.com>
* Thomas Voß <thomas.voss@canonical.com>
*/
#ifndef UBUNTU_APPLICATION_ARCHIVE_H_
#define UBUNTU_APPLICATION_ARCHIVE_H_
#include <ubuntu/status.h>
#include <ubuntu/visibility.h>
#include <stdint.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct UbuntuApplicationArchive_ UApplicationArchive;
UBUNTU_DLL_PUBLIC UApplicationArchive*
u_application_archive_new();
UBUNTU_DLL_PUBLIC void
u_application_archive_destroy(
UApplicationArchive *archive);
UBUNTU_DLL_PUBLIC UStatus
u_application_archive_write(
UApplicationArchive *archive,
int64_t s);
UBUNTU_DLL_PUBLIC UStatus
u_application_archive_write_stringn(
UApplicationArchive *archive,
const char *s,
size_t size);
UBUNTU_DLL_PUBLIC UStatus
u_application_archive_write_wstringn(
UApplicationArchive *archive,
const wchar_t *s,
size_t size);
UBUNTU_DLL_PUBLIC UStatus
u_application_archive_write_bytes(
UApplicationArchive *archive,
const intptr_t *data,
size_t size);
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);
UBUNTU_DLL_PUBLIC UStatus
u_application_archive_read(
const UApplicationArchive *archive,
int64_t *s);
UBUNTU_DLL_PUBLIC UStatus
u_application_archive_read_stringn(
const UApplicationArchive *archive,
const char **s,
size_t *size);
UBUNTU_DLL_PUBLIC UStatus
u_application_archive_read_wstringn(
UApplicationArchive *archive,
const wchar_t *s,
size_t size);
UBUNTU_DLL_PUBLIC UStatus
u_application_archive_read_bytes(
UApplicationArchive *archive,
const intptr_t *data,
size_t size);
#ifdef __cplusplus
}
#endif
#endif /* UBUNTU_APPLICATION_ARCHIVE_H_ */
u_application_archive_write_wstringn
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.
u_application_archive_write_end_blockn
UBUNTU_DLL_PUBLIC UStatus u_application_archive_write_end_blockn(UApplicationArchive *archive, const char *name, size_t size)
UbuntuStatus
UbuntuStatus
Indicates the status of an operation.
Definition: status.h:26
u_application_archive_read_wstringn
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.
u_application_archive_read
UBUNTU_DLL_PUBLIC UStatus u_application_archive_read(const UApplicationArchive *archive, int64_t *s)
Reads a signed 64-bit integer from the supplied archive.
u_application_archive_write_bytes
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.
u_application_archive_write
UBUNTU_DLL_PUBLIC UStatus u_application_archive_write(UApplicationArchive *archive, int64_t s)
Writes a signed 64-bit integer to the supplied archive.
visibility.h
u_application_archive_read_bytes
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.
status.h
u_application_archive_new
UBUNTU_DLL_PUBLIC UApplicationArchive * u_application_archive_new()
Creates a new archive, ownership is transferred to caller.
UApplicationArchive
struct UbuntuApplicationArchive_ UApplicationArchive
Definition: archive.h:33
UBUNTU_DLL_PUBLIC
#define UBUNTU_DLL_PUBLIC
Definition: visibility.h:26
u_application_archive_destroy
UBUNTU_DLL_PUBLIC void u_application_archive_destroy(UApplicationArchive *archive)
Destroys the given archive instance and releases all resources held by the instance.
u_application_archive_write_begin_blockn
UBUNTU_DLL_PUBLIC UStatus u_application_archive_write_begin_blockn(UApplicationArchive *archive, const char *name, size_t size)
u_application_archive_read_stringn
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.
u_application_archive_write_stringn
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.