forked from ElektraInitiative/libelektra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hexcode.h
37 lines (27 loc) · 789 Bytes
/
hexcode.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
/**
* @file
*
* @brief
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*/
#ifndef ELEKTRA_PLUGIN_HEXCODE_H
#define ELEKTRA_PLUGIN_HEXCODE_H
#include <kdbplugin.h>
typedef struct
{
/* Which chars to hex-encode */
char hd[256];
char escape;
char * buf;
size_t bufalloc;
} CHexData;
ssize_t keySetRaw (Key * key, const void * newBinary, size_t dataSize);
void elektraHexcodeEncode (Key * cur, CHexData * hd);
void elektraHexcodeDecode (Key * cur, CHexData * hd);
int elektraHexcodeGet (Plugin * handle, KeySet * ks, Key * parentKey);
int elektraHexcodeSet (Plugin * handle, KeySet * ks, Key * parentKey);
int elektraHexcodeOpen (Plugin * handle, Key *);
int elektraHexcodeClose (Plugin * handle, Key * k);
Plugin * ELEKTRA_PLUGIN_EXPORT;
#endif