Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sol-lwm2m-bs-server.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Soletta (TM) Project
3  *
4  * Copyright (C) 2015 Intel Corporation. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #pragma once
19 
20 #include "sol-lwm2m.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
48 
55 
76  const char **known_clients, uint16_t num_sec_modes, ...);
77 
92  void (*sol_lwm2m_bootstrap_server_request_cb)(void *data,
93  struct sol_lwm2m_bootstrap_server *server,
94  struct sol_lwm2m_bootstrap_client_info *bs_cinfo),
95  const void *data);
96 
107  void (*sol_lwm2m_bootstrap_server_request_cb)(void *data,
108  struct sol_lwm2m_bootstrap_server *server,
109  struct sol_lwm2m_bootstrap_client_info *bs_cinfo),
110  const void *data);
111 
130  struct sol_lwm2m_bootstrap_client_info *client, const char *path,
131  struct sol_lwm2m_resource **instances, size_t *instances_len,
132  uint16_t *instances_ids, size_t len,
133  void (*sol_lwm2m_bootstrap_server_status_response_cb)(void *data,
134  struct sol_lwm2m_bootstrap_server *server,
135  struct sol_lwm2m_bootstrap_client_info *client, const char *path,
136  enum sol_coap_response_code response_code),
137  const void *data);
138 
155  struct sol_lwm2m_bootstrap_client_info *client, const char *path,
156  struct sol_lwm2m_resource *resources, size_t len,
157  void (*sol_lwm2m_bootstrap_server_status_response_cb)(void *data,
158  struct sol_lwm2m_bootstrap_server *server,
159  struct sol_lwm2m_bootstrap_client_info *client, const char *path,
160  enum sol_coap_response_code response_code),
161  const void *data);
162 
176  struct sol_lwm2m_bootstrap_client_info *client, const char *path,
177  void (*sol_lwm2m_bootstrap_server_status_response_cb)(void *data,
178  struct sol_lwm2m_bootstrap_server *server,
179  struct sol_lwm2m_bootstrap_client_info *client, const char *path,
180  enum sol_coap_response_code response_code),
181  const void *data);
182 
192 
205  struct sol_lwm2m_bootstrap_client_info *client);
206 
214 
222 
226 #ifdef __cplusplus
227 }
228 #endif
struct sol_lwm2m_bootstrap_server sol_lwm2m_bootstrap_server
A handle to a LWM2M bootstrap server.
Definition: sol-lwm2m-bs-server.h:47
const char * known_clients[]
Definition: lwm2m-bs-server.c:77
static struct sol_http_server * server
Definition: server-https.c:52
int sol_lwm2m_bootstrap_server_send_finish(struct sol_lwm2m_bootstrap_server *server, struct sol_lwm2m_bootstrap_client_info *client)
Signals the end of the Bootstrap Process.
int sol_lwm2m_bootstrap_server_write_object(struct sol_lwm2m_bootstrap_server *server, struct sol_lwm2m_bootstrap_client_info *client, const char *path, struct sol_lwm2m_resource **instances, size_t *instances_len, uint16_t *instances_ids, size_t len, void(*sol_lwm2m_bootstrap_server_status_response_cb)(void *data, struct sol_lwm2m_bootstrap_server *server, struct sol_lwm2m_bootstrap_client_info *client, const char *path, enum sol_coap_response_code response_code), const void *data)
Writes a full object through the Bootstrap Interface.
const char * sol_lwm2m_bootstrap_client_info_get_name(const struct sol_lwm2m_bootstrap_client_info *client)
Gets the name of bootstrap client.
int sol_lwm2m_bootstrap_server_add_request_monitor(struct sol_lwm2m_bootstrap_server *server, void(*sol_lwm2m_bootstrap_server_request_cb)(void *data, struct sol_lwm2m_bootstrap_server *server, struct sol_lwm2m_bootstrap_client_info *bs_cinfo), const void *data)
Adds a bootstrap request monitor to the server.
Routines that handle the LWM2M protocol.
int sol_lwm2m_bootstrap_server_write(struct sol_lwm2m_bootstrap_server *server, struct sol_lwm2m_bootstrap_client_info *client, const char *path, struct sol_lwm2m_resource *resources, size_t len, void(*sol_lwm2m_bootstrap_server_status_response_cb)(void *data, struct sol_lwm2m_bootstrap_server *server, struct sol_lwm2m_bootstrap_client_info *client, const char *path, enum sol_coap_response_code response_code), const void *data)
Writes an object instance or resource through the Bootstrap Interface.
sol_coap_response_code
Set of response codes available for a response packet.
Definition: sol-coap.h:190
struct sol_lwm2m_bootstrap_server * sol_lwm2m_bootstrap_server_new(uint16_t port, const char **known_clients, uint16_t num_sec_modes,...)
Creates a new LWM2M bootstrap server.
struct sol_lwm2m_bootstrap_client_info sol_lwm2m_bootstrap_client_info
A handle that contains information about a bootstrapping LWM2M client.
Definition: sol-lwm2m-bs-server.h:54
static int port
Definition: server-sse.c:72
int sol_lwm2m_bootstrap_server_delete_object_instance(struct sol_lwm2m_bootstrap_server *server, struct sol_lwm2m_bootstrap_client_info *client, const char *path, void(*sol_lwm2m_bootstrap_server_status_response_cb)(void *data, struct sol_lwm2m_bootstrap_server *server, struct sol_lwm2m_bootstrap_client_info *client, const char *path, enum sol_coap_response_code response_code), const void *data)
Deletes an object instance on a client through the Bootstrap Interface.
void sol_lwm2m_bootstrap_server_del(struct sol_lwm2m_bootstrap_server *server)
Deletes a bootstrap server instance.
int sol_lwm2m_bootstrap_server_del_request_monitor(struct sol_lwm2m_bootstrap_server *server, void(*sol_lwm2m_bootstrap_server_request_cb)(void *data, struct sol_lwm2m_bootstrap_server *server, struct sol_lwm2m_bootstrap_client_info *bs_cinfo), const void *data)
Removes a bootstrap request monitor from the server.
const struct sol_network_link_addr * sol_lwm2m_bootstrap_client_info_get_address(const struct sol_lwm2m_bootstrap_client_info *client)
Gets the bootstrap client address.
Struct that represents a LWM2M resource.
Definition: sol-lwm2m.h:355