aboutsummaryrefslogtreecommitdiffstats
path: root/afb-daemon.pc.in
blob: 701e3ba5547736b27d4840f63be8ad32ec03c4ac (plain)
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
##
## Copyright (C) 2016-2019 "IoT.bzh"
##
## This file is part of afb-daemon project.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
##   http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##

includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
binding_install_dir=@binding_install_dir@

Name: @PROJECT_PRETTY_NAME@
Description: @PROJECT_DESCRIPTION@
Version: @PROJECT_VERSION@
URL: @PROJECT_URL@

Requires: json-c
Cflags: -I${includedir}
section // handle: a void* pass to callback when processing section static CtlSectionT ctlSections[]= { {.key="plugins" , .loadCB= PluginConfig, .handle= &halCallbacks}, {.key="onload" , .loadCB= OnloadConfig}, {.key="halmap" , .loadCB= MapConfigLoad}, {.key=NULL} }; ``` 3) Do controller config parsing at binding pre-init ``` // check if config file exist const char *dirList= getenv("CTL_CONFIG_PATH"); if (!dirList) dirList=CONTROL_CONFIG_PATH; ctlConfig = CtlConfigLoad(dirList, ctlSections); if (!ctlConfig) goto OnErrorExit; ``` 4) Exec controller config during binding init ``` int err = CtlConfigExec (ctlConfig); ``` For sample usage look at https://github.com/fulup-bzh/ctl-utilities