Program Listing for File server.h
↰ Return to documentation for file (include_public/anjay/server.h)
/*
* Copyright 2017-2026 AVSystem <avsystem@avsystem.com>
* AVSystem Anjay LwM2M SDK
* All rights reserved.
*
* Licensed under AVSystem Anjay LwM2M Client SDK - Non-Commercial License.
* See the attached LICENSE file for details.
*/
#ifndef ANJAY_INCLUDE_ANJAY_SERVER_H
#define ANJAY_INCLUDE_ANJAY_SERVER_H
#include <anjay/anjay_config.h>
#include <anjay/dm.h>
#include <avsystem/commons/avs_stream.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
anjay_ssid_t ssid;
int32_t lifetime;
int32_t default_min_period;
int32_t default_max_period;
int32_t disable_timeout;
const char *binding;
bool notification_storing;
#ifdef ANJAY_WITH_LWM2M11
const bool *bootstrap_on_registration_failure;
char preferred_transport;
bool mute_send;
const uint32_t *communication_retry_count;
const uint32_t *communication_retry_timer;
const uint32_t *communication_sequence_retry_count;
const uint32_t *communication_sequence_delay_timer;
# ifdef ANJAY_WITH_SMS
const bool *trigger;
# endif // ANJAY_WITH_SMS
#endif // ANJAY_WITH_LWM2M11
} anjay_server_instance_t;
int anjay_server_object_add_instance(anjay_t *anjay,
const anjay_server_instance_t *instance,
anjay_iid_t *inout_iid);
void anjay_server_object_purge(anjay_t *anjay);
AVS_LIST(const anjay_ssid_t) anjay_server_get_ssids(anjay_t *anjay);
avs_error_t anjay_server_object_persist(anjay_t *anjay,
avs_stream_t *out_stream);
avs_error_t anjay_server_object_restore(anjay_t *anjay,
avs_stream_t *in_stream);
bool anjay_server_object_is_modified(anjay_t *anjay);
int anjay_server_object_install(anjay_t *anjay);
int anjay_server_object_set_lifetime(anjay_t *anjay,
anjay_iid_t iid,
int32_t lifetime);
#ifdef __cplusplus
}
#endif
#endif /* ANJAY_INCLUDE_ANJAY_SERVER_H */