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-flow-resolver.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 
19 #pragma once
20 
21 #include <stdio.h>
22 
23 #include "sol-flow.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
54 typedef struct sol_flow_resolver {
55 #ifndef SOL_NO_API_VERSION
56 #define SOL_FLOW_RESOLVER_API_VERSION (1)
57  uint16_t api_version;
58 #endif
59  const char *name;
60  void *data;
74  int (*resolve)(void *data, const char *id, struct sol_flow_node_type const **type, struct sol_flow_node_named_options *named_opts);
76 
81 
89 
108 int sol_flow_resolve(
109  const struct sol_flow_resolver *resolver,
110  const char *id,
111  const struct sol_flow_node_type **type,
112  struct sol_flow_node_named_options *named_opts);
113 
118 #ifdef __cplusplus
119 }
120 #endif
const struct sol_flow_resolver * sol_flow_get_default_resolver(void)
The default resolver set at compile time.
int(* resolve)(void *data, const char *id, struct sol_flow_node_type const **type, struct sol_flow_node_named_options *named_opts)
Resolution routine.
Definition: sol-flow-resolver.h:74
void * data
Resolver's context data (will be provided to resolve)
Definition: sol-flow-resolver.h:60
const char * name
Resolver's name (useful for logging)
Definition: sol-flow-resolver.h:59
Resolver's structure.
Definition: sol-flow-resolver.h:54
const struct sol_flow_resolver * sol_flow_get_builtins_resolver(void)
Resolver for built-in node types.
The node type describes the capabilities and operations of a node.
Definition: sol-flow.h:796
int sol_flow_resolve(const struct sol_flow_resolver *resolver, const char *id, const struct sol_flow_node_type **type, struct sol_flow_node_named_options *named_opts)
Function used to resolve id into a node type.
Named options is an intermediate structure to handle Node Options parsing.
Definition: sol-flow.h:619
struct sol_flow_resolver sol_flow_resolver
Resolver's structure.
These routines are used for Soletta flows manipulation.