File: xpc_wrapper_darwin.h

package info (click to toggle)
golang-github-bettercap-gatt 0.0~git20240808.ec4935e-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 568 kB
  • sloc: ansic: 82; asm: 18; makefile: 3
file content (32 lines) | stat: -rw-r--r-- 970 bytes parent folder | download
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
#ifndef _XPC_WRAPPER_H_
#define _XPC_WRAPPER_H_

#include <stdlib.h>
#include <stdio.h>
#include <xpc/xpc.h>

extern xpc_type_t TYPE_ERROR;

extern xpc_type_t TYPE_ARRAY;
extern xpc_type_t TYPE_DATA;
extern xpc_type_t TYPE_DICT;
extern xpc_type_t TYPE_INT64;
extern xpc_type_t TYPE_STRING;
extern xpc_type_t TYPE_UUID;

extern xpc_object_t ERROR_CONNECTION_INVALID;
extern xpc_object_t ERROR_CONNECTION_INTERRUPTED;
extern xpc_object_t ERROR_CONNECTION_TERMINATED;

extern xpc_connection_t XpcConnect(char *, uintptr_t);
extern void XpcSendMessage(xpc_connection_t, xpc_object_t, bool, bool);
extern void XpcArrayApply(uintptr_t, xpc_object_t);
extern void XpcDictApply(uintptr_t, xpc_object_t);
extern void XpcUUIDGetBytes(void *, xpc_object_t);

// the input type for xpc_uuid_create should be uuid_t but CGO instists on unsigned char *
// typedef uuid_t * ptr_to_uuid_t;
typedef unsigned char * ptr_to_uuid_t;
extern const ptr_to_uuid_t ptr_to_uuid(void *p);

#endif