forked from troybowman/ios_instruments_client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cftypes.h
27 lines (20 loc) · 992 Bytes
/
cftypes.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
#ifndef CFTYPES_H
#define CFTYPES_H
#include <CoreFoundation/CoreFoundation.h>
#include "common.h"
//------------------------------------------------------------------------------
// convert the given CFString to an STL string
string_t to_stlstr(CFStringRef ref);
//------------------------------------------------------------------------------
// get a human readable description of the given CF object
string_t get_description(CFTypeRef ref);
//------------------------------------------------------------------------------
// serialize a CF object
void archive(bytevec_t *buf, CFTypeRef ref);
//------------------------------------------------------------------------------
// deserialize a CF object
CFTypeRef unarchive(const uint8_t *buf, size_t bufsize);
//------------------------------------------------------------------------------
// deserialize an array of CF objects
CFArrayRef deserialize(const uint8_t *buf, size_t bufsize, string_t *errbuf = NULL);
#endif // CFTYPES_H