-
Notifications
You must be signed in to change notification settings - Fork 92
/
Copy pathmetautils_gba.h
51 lines (35 loc) · 1.69 KB
/
metautils_gba.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
OpenIO SDS metautils
Copyright (C) 2014 Worldline, as part of Redcurrant
Copyright (C) 2015-2020 OpenIO SAS, as part of OpenIO SDS
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library 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 library.
*/
#ifndef OIO_SDS__metautils__lib__metautils_gba_h
# define OIO_SDS__metautils__lib__metautils_gba_h 1
#include <glib.h>
#include <metautils/lib/metatypes.h>
GByteArray* metautils_gba_dup(const GByteArray *gba);
GByteArray* metautils_gba_from_string(const gchar *str);
GByteArray* metautils_gba_from_hexstring(const gchar *str);
/** Compare 2 GByteArray. Can be cast to GEqualFunc and used as 2nd param of
* g_hash_table_new(). */
gboolean metautils_gba_equal(const GByteArray *a, const GByteArray *b);
/** 3-way comparison */
int metautils_gba_cmp(const GByteArray *a, const GByteArray *b);
/** Calls g_byte_array_free() on GByteArray in GLib containers */
void metautils_gba_clean(gpointer p);
void metautils_gba_cleanv(GByteArray **tab);
/** @see g_byte_array_unref() */
void metautils_gba_unref(gpointer p);
/** Convert the content to its hexadecimal representation */
GString* metautils_gba_to_hexgstr(GString *gstr, GByteArray *gba);
#endif /*OIO_SDS__metautils__lib__metautils_gba_h*/