Extensible Connection-oriented Messaging (XCM)
Loading...
Searching...
No Matches
xcm_attr.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: BSD-3-Clause
3 * Copyright(c) 2020 Ericsson AB
4 */
5
6#ifndef XCM_ATTR_H
7#define XCM_ATTR_H
8#ifdef __cplusplus
9extern "C" {
10#endif
11
18#include <stdbool.h>
19#include <xcm.h>
20#include <xcm_attr_types.h>
21
44int xcm_attr_set(struct xcm_socket *socket, const char *name,
45 enum xcm_attr_type type, const void *value, size_t len);
46
59int xcm_attr_set_bool(struct xcm_socket *socket, const char *name, bool value);
60
73int xcm_attr_set_int64(struct xcm_socket *socket, const char *name,
74 int64_t value);
75
88int xcm_attr_set_str(struct xcm_socket *socket, const char *name,
89 const char *value);
90
116int xcm_attr_get(struct xcm_socket *socket, const char *name,
117 enum xcm_attr_type *type, void *value, size_t capacity);
118
135int xcm_attr_get_bool(struct xcm_socket *socket, const char *name,
136 bool *value);
137
154int xcm_attr_get_int64(struct xcm_socket *socket, const char *name,
155 int64_t *value);
156
175int xcm_attr_get_str(struct xcm_socket *socket, const char *name,
176 char *value, size_t capacity);
177
179typedef void (*xcm_attr_cb)(const char *attr_name, enum xcm_attr_type type,
180 void *value, size_t value_len, void *cb_data);
181
195void xcm_attr_get_all(struct xcm_socket *socket, xcm_attr_cb cb,
196 void *cb_data);
197
198#ifdef __cplusplus
199}
200#endif
201#endif
This file contains the core Extensible Connection-oriented Messaging (XCM) API.
int xcm_attr_set(struct xcm_socket *socket, const char *name, enum xcm_attr_type type, const void *value, size_t len)
int xcm_attr_get_int64(struct xcm_socket *socket, const char *name, int64_t *value)
int xcm_attr_get_str(struct xcm_socket *socket, const char *name, char *value, size_t capacity)
int xcm_attr_set_int64(struct xcm_socket *socket, const char *name, int64_t value)
void xcm_attr_get_all(struct xcm_socket *socket, xcm_attr_cb cb, void *cb_data)
int xcm_attr_set_str(struct xcm_socket *socket, const char *name, const char *value)
int xcm_attr_set_bool(struct xcm_socket *socket, const char *name, bool value)
int xcm_attr_get(struct xcm_socket *socket, const char *name, enum xcm_attr_type *type, void *value, size_t capacity)
int xcm_attr_get_bool(struct xcm_socket *socket, const char *name, bool *value)
void(* xcm_attr_cb)(const char *attr_name, enum xcm_attr_type type, void *value, size_t value_len, void *cb_data)
Definition xcm_attr.h:179
This file contains type definitions for the XCM attribute access API.
xcm_attr_type
Definition xcm_attr_types.h:18