osaf/services/saf/amf/amfd/include/Makefile.am | 1 + osaf/services/saf/amf/amfd/include/sg.h | 1 + osaf/services/saf/amf/amfd/include/su.h | 33 ------------------ osaf/services/saf/amf/amfd/include/sutcomptype.h | 44 ++++++++++++++++++++++++ osaf/services/saf/amf/amfd/main.cc | 3 +- osaf/services/saf/amf/amfd/sutcomptype.cc | 3 +- osaf/services/saf/amf/amfd/sutype.cc | 1 + 7 files changed, 50 insertions(+), 36 deletions(-)
Moving sgtype things from sg.h into its own header. diff --git a/osaf/services/saf/amf/amfd/include/Makefile.am b/osaf/services/saf/amf/amfd/include/Makefile.am --- a/osaf/services/saf/amf/amfd/include/Makefile.am +++ b/osaf/services/saf/amf/amfd/include/Makefile.am @@ -43,6 +43,7 @@ noinst_HEADERS = \ sg.h \ si.h \ su.h \ + sutcomptype.h \ sutype.h \ susi.h \ timer.h \ diff --git a/osaf/services/saf/amf/amfd/include/sg.h b/osaf/services/saf/amf/amfd/include/sg.h --- a/osaf/services/saf/amf/amfd/include/sg.h +++ b/osaf/services/saf/amf/amfd/include/sg.h @@ -36,6 +36,7 @@ #include <saAmf.h> #include <ncspatricia.h> +#include <def.h> #include <su.h> #include <si.h> #include <amf_defs.h> diff --git a/osaf/services/saf/amf/amfd/include/su.h b/osaf/services/saf/amf/amfd/include/su.h --- a/osaf/services/saf/amf/amfd/include/su.h +++ b/osaf/services/saf/amf/amfd/include/su.h @@ -129,16 +129,6 @@ class AVD_SU { extern AmfDb<AVD_SU> *su_db; -typedef struct { - NCS_PATRICIA_NODE tree_node; /* key is name */ - SaNameT name; - SaUint32T saAmfSutMaxNumComponents; - SaUint32T saAmfSutMinNumComponents; - - SaUint32T curr_num_components; - -} AVD_SUTCOMP_TYPE; - /** * Get SUs from IMM and create internal objects * @@ -151,29 +141,6 @@ extern SaAisErrorT avd_su_config_get(con */ extern void avd_su_constructor(void); -/** - * Get SaAmfSutCompType object from DB using given key - * - * @param dn - * - * @return AVD_SUTCOMP_TYPE* - */ -extern AVD_SUTCOMP_TYPE *avd_sutcomptype_get(const SaNameT *dn); - -/** - * Get configuration for all SaAmfSutCompType objects from IMM and - * create AVD internal objects. - * @param cb - * - * @return int - */ -extern SaAisErrorT avd_sutcomptype_config_get(SaNameT *sutype_name, struct avd_sutype *sut); - -/** - * Class constructor, must be called before any other function - */ -extern void avd_sutcomptype_constructor(void); - extern AVD_SU *avd_su_get_or_create(const SaNameT *dn); #endif diff --git a/osaf/services/saf/amf/amfd/include/sutcomptype.h b/osaf/services/saf/amf/amfd/include/sutcomptype.h new file mode 100644 --- /dev/null +++ b/osaf/services/saf/amf/amfd/include/sutcomptype.h @@ -0,0 +1,44 @@ +/* -*- OpenSAF -*- + * + * (C) Copyright 2014 The OpenSAF Foundation + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed + * under the GNU Lesser General Public License Version 2.1, February 1999. + * The complete license can be accessed from the following location: + * http://opensource.org/licenses/lgpl-license.php + * See the Copying file included with the OpenSAF distribution for full + * licensing terms. + * + * Author(s): Ericsson + * + */ + +/***************************************************************************** + + DESCRIPTION: SuTypeCompType class definition + +****************************************************************************** +*/ + +#ifndef AVD_SUCOMPTYPE_H +#define AVD_SUCOMPTYPE_H + +#include <saAmf.h> +#include <ncspatricia.h> +#include "sutype.h" + +typedef struct { + NCS_PATRICIA_NODE tree_node; /* key is name */ + SaNameT name; + SaUint32T saAmfSutMaxNumComponents; + SaUint32T saAmfSutMinNumComponents; + SaUint32T curr_num_components; +} AVD_SUTCOMP_TYPE; + +AVD_SUTCOMP_TYPE *avd_sutcomptype_get(const SaNameT *dn); +SaAisErrorT avd_sutcomptype_config_get(SaNameT *sutype_name, struct avd_sutype *sut); +void avd_sutcomptype_constructor(void); + +#endif diff --git a/osaf/services/saf/amf/amfd/main.cc b/osaf/services/saf/amf/amfd/main.cc --- a/osaf/services/saf/amf/amfd/main.cc +++ b/osaf/services/saf/amf/amfd/main.cc @@ -52,8 +52,9 @@ #include <si_dep.h> #include <hlt.h> #include <clm.h> +#include <sutcomptype.h> +#include <sutype.h> #include <su.h> -#include <sutype.h> static const char* internal_version_id_ __attribute__ ((unused)) = "@(#) $Id: " INTERNAL_VERSION_ID " $"; diff --git a/osaf/services/saf/amf/amfd/sutcomptype.cc b/osaf/services/saf/amf/amfd/sutcomptype.cc --- a/osaf/services/saf/amf/amfd/sutcomptype.cc +++ b/osaf/services/saf/amf/amfd/sutcomptype.cc @@ -21,8 +21,7 @@ #include <logtrace.h> #include <util.h> -#include <su.h> -#include <sutype.h> +#include <sutcomptype.h> #include <imm.h> static NCS_PATRICIA_TREE sutcomptype_db; diff --git a/osaf/services/saf/amf/amfd/sutype.cc b/osaf/services/saf/amf/amfd/sutype.cc --- a/osaf/services/saf/amf/amfd/sutype.cc +++ b/osaf/services/saf/amf/amfd/sutype.cc @@ -22,6 +22,7 @@ #include <util.h> #include <sutype.h> +#include <sutcomptype.h> #include <imm.h> #include <cluster.h> #include <ntf.h> ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel