X_<VENDOR>_WiFiLife: remove it from bbf

From now, X_<VENDOR>_WiFiLife object will be added by wifilife package
This commit is contained in:
Amin Ben Ramdhane 2020-05-12 16:37:36 +01:00
parent 3dd66344b3
commit 7250cbd1e9
6 changed files with 0 additions and 250 deletions

View file

@ -57,7 +57,6 @@ libbbfdm_la_SOURCES += \
../dmtree/tr181/x_iopsys_eu_dropbear.c \
../dmtree/tr181/x_iopsys_eu_owsd.c \
../dmtree/tr181/x_iopsys_eu_buttons.c \
../dmtree/tr181/x_iopsys_eu_wifilife.c \
../dmtree/tr181/xmpp.c \
../dmtree/tr181/wifi.c \
../dmtree/tr181/ethernet.c \

View file

@ -21,7 +21,6 @@
#include "x_iopsys_eu_owsd.h"
#include "x_iopsys_eu_dropbear.h"
#include "x_iopsys_eu_buttons.h"
#include "x_iopsys_eu_wifilife.h"
#include "ip.h"
#include "ethernet.h"
#include "bridging.h"

View file

@ -22,7 +22,6 @@
#include "x_iopsys_eu_owsd.h"
#include "x_iopsys_eu_dropbear.h"
#include "x_iopsys_eu_buttons.h"
#include "x_iopsys_eu_wifilife.h"
#include "ip.h"
#include "ethernet.h"
#include "bridging.h"
@ -84,7 +83,6 @@ DMOBJ tRoot_181_Obj[] = {
{CUSTOM_PREFIX"MLD", &DMREAD, NULL, NULL, NULL, NULL, NULL, &DMNONE, NULL, X_IOPSYS_EU_MLDObj, X_IOPSYS_EU_MLDParams, NULL, BBFDM_BOTH},
{CUSTOM_PREFIX"Dropbear", &DMWRITE, add_dropbear_instance, delete_dropbear_instance, NULL, browseXIopsysEuDropbear, NULL, &DMNONE, NULL, NULL, X_IOPSYS_EU_DropbearParams, NULL, BBFDM_BOTH},
{CUSTOM_PREFIX"Buttons", &DMREAD, NULL, NULL, NULL, browseXIopsysEuButton, NULL, &DMNONE, NULL, NULL, X_IOPSYS_EU_ButtonParams, NULL, BBFDM_BOTH},
{CUSTOM_PREFIX"WiFiLife", &DMREAD, NULL, NULL, NULL, NULL, NULL, &DMNONE, NULL, X_IOPSYS_EU_WiFiLifeObj, X_IOPSYS_EU_WiFiLifeParams, NULL, BBFDM_BOTH},
{"Bridging",&DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tBridgingObj, tBridgingParams, NULL, BBFDM_BOTH},
{"WiFi",&DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tWiFiObj, tWiFiParams, NULL, BBFDM_BOTH},
{"IP",&DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tIPObj, tIPParams, NULL, BBFDM_BOTH},

View file

@ -1,127 +0,0 @@
/*
* Copyright (C) 2019 iopsys Software Solutions AB
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1
* as published by the Free Software Foundation
*
* Author: Amin Ben Ramdhane <amin.benramdhane@pivasoftware.com>
*/
#include "x_iopsys_eu_wifilife.h"
static int browseWifiLifeSteeringObj(struct dmctx *dmctx, DMNODE *parent_node, void *prev_data, char *prev_instance)
{
char *isteer = NULL, *isteer_last = NULL;
struct dmmap_dup *p;
LIST_HEAD(dup_list);
synchronize_specific_config_sections_with_dmmap("wifilife", "steer", "dmmap_wifilife", &dup_list);
list_for_each_entry(p, &dup_list, list) {
isteer = handle_update_instance(1, dmctx, &isteer_last, update_instance_alias, 3, p->dmmap_section, "steer_instance", "steer_alias");
if (DM_LINK_INST_OBJ(dmctx, parent_node, (void *)p->config_section, isteer) == DM_STOP)
break;
}
free_dmmap_config_dup_list(&dup_list);
return 0;
}
/*************************************************************************************
**** GET / SET function ****
**************************************************************************************/
static int get_x_iopsys_eu_wifilife_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_option_value_string("wifilife", "@wifilife[0]", "enabled", value);
if ((*value)[0] == '\0') {
*value = "1";
}
return 0;
}
static int set_x_iopsys_eu_wifilife_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
bool b;
switch (action) {
case VALUECHECK:
if (dm_validate_boolean(value))
return FAULT_9007;
return 0;
case VALUESET:
string_to_bool(value, &b);
dmuci_set_value("wifilife", "@wifilife[0]", "enabled", b ? "1" : "0");
return 0;
}
return 0;
}
static int get_wifilife_steering_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_value_by_section_string((struct uci_section *)data, "enabled", value);
if ((*value)[0] == '\0')
*value = "0";
return 0;
}
static int set_wifilife_steering_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
bool b;
switch (action) {
case VALUECHECK:
if (dm_validate_boolean(value))
return FAULT_9007;
return 0;
case VALUESET:
string_to_bool(value, &b);
dmuci_set_value_by_section((struct uci_section *)data, "enabled", b ? "1" : "0");
return 0;
}
return 0;
}
static int get_wifilife_steering_legacy_fallback(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_value_by_section_string((struct uci_section *)data, "fallback_legacy", value);
if ((*value)[0] == '\0')
*value = "0";
return 0;
}
static int set_wifilife_steering_legacy_fallback(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
bool b;
switch (action) {
case VALUECHECK:
if (dm_validate_boolean(value))
return FAULT_9007;
return 0;
case VALUESET:
string_to_bool(value, &b);
dmuci_set_value_by_section((struct uci_section *)data, "fallback_legacy", b ? "1" : "0");
return 0;
}
return 0;
}
/*** DMROOT.X_IOPSYS_EU_WiFiLife. ****/
DMOBJ X_IOPSYS_EU_WiFiLifeObj[] = {
/* OBJ, permission, addobj, delobj, checkobj, browseinstobj, forced_inform, notification, nextdynamicobj, nextobj, leaf, linker, bbfdm_type*/
{"Steering", &DMREAD, NULL, NULL, NULL, browseWifiLifeSteeringObj, NULL, NULL, NULL, NULL, WiFiLifeSteeringParams, NULL, BBFDM_BOTH},
{0}
};
DMLEAF X_IOPSYS_EU_WiFiLifeParams[] = {
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
{"Enable", &DMWRITE, DMT_BOOL, get_x_iopsys_eu_wifilife_enable, set_x_iopsys_eu_wifilife_enable, NULL, NULL, BBFDM_BOTH},
{0}
};
DMLEAF WiFiLifeSteeringParams[] = {
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
{"Enable", &DMWRITE, DMT_BOOL, get_wifilife_steering_enable, set_wifilife_steering_enable, NULL, NULL, BBFDM_BOTH},
{"LegacyFallback", &DMWRITE, DMT_BOOL, get_wifilife_steering_legacy_fallback, set_wifilife_steering_legacy_fallback, NULL, NULL, BBFDM_BOTH},
{0}
};

View file

@ -1,20 +0,0 @@
/*
* Copyright (C) 2019 iopsys Software Solutions AB
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1
* as published by the Free Software Foundation
*
* Author: Amin Ben Ramdhane <amin.benramdhane@pivasoftware.com>
*/
#ifndef __WIFILIFE_H
#define __WIFILIFE_H
#include <libbbf_api/dmcommon.h>
extern DMOBJ X_IOPSYS_EU_WiFiLifeObj[];
extern DMLEAF X_IOPSYS_EU_WiFiLifeParams[];
extern DMLEAF WiFiLifeSteeringParams[];
#endif // __WIFILIFE_H

View file

@ -1,99 +0,0 @@
{
"Device.X_IOPSYS_EU_WiFiLife.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"array": false,
"Enable": {
"type": "boolean",
"protocols": [
"cwmp",
"usp"
],
"read": true,
"write": true,
"mapping": [
{
"type": "uci",
"uci": {
"file": "wifilife",
"section": {
"name": "@wifilife[0]"
},
"option": {
"name": "enabled"
}
}
}
]
},
"Device.X_IOPSYS_EU_WiFiLife.Steering": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"array": true,
"mapping": {
"type": "uci",
"uci": {
"file": "wifilife",
"section": {
"type": "steer"
},
"dmmapfile": "dmmap_wifilife"
}
},
"Enable": {
"type": "boolean",
"protocols": [
"cwmp",
"usp"
],
"read": true,
"write": true,
"mapping": [
{
"type": "uci",
"uci": {
"file": "wifilife",
"section": {
"type": "steer",
"index": "@i-1"
},
"option": {
"name": "enabled"
}
}
}
]
},
"LegacyFallback": {
"type": "boolean",
"protocols": [
"cwmp",
"usp"
],
"read": true,
"write": true,
"mapping": [
{
"type": "uci",
"uci": {
"file": "wifilife",
"section": {
"type": "steer",
"index": "@i-1"
},
"option": {
"name": "fallback_legacy"
}
}
}
]
}
}
}
}