RDK Documentation (Open Sourced RDK Components)
Device_WiFi_EndPoint_Profile.h
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 /**
21  * @defgroup TR69_HOSTIF_WIFI_ENDPOINT_PROFILE TR-069 Object (Device.WiFi.EndPoint.{i}.Profile.{i}.) Public APIs
22  * This module provides the interface functions related to wireless end point profile table.
23  *
24  * At most one entry in this table (regardless of whether or not it is enabled) can exist with a given value for Alias.
25  * On creation of a new table entry, the CPE MUST choose an initial value for Alias such that the new entry does not
26  * conflict with any existing entries.
27  * At most one enabled entry in this table can exist with all the same values for SSID, Location and Priority.
28  * @ingroup TR69_HOSTIF_WIFI
29  */
30 
31 /**
32 * @defgroup tr69hostif
33 * @{
34 * @defgroup hostif
35 * @{
36 **/
37 
38 
39 #ifndef DEVICE_WIFI_ENDPOINT_PROFILE_H_
40 #define DEVICE_WIFI_ENDPOINT_PROFILE_H_
41 
42 #include "hostIf_main.h"
43 #include "hostIf_utils.h"
44 #include "hostIf_tr69ReqHandler.h"
45 #include "hostIf_updateHandler.h"
46 #include "Device_WiFi_EndPoint.h"
47 
49 
50  static GHashTable *ifHash;
51  static GMutex* m_mutex;
52  int dev_id = 0; //CID:103090 - UNINIT_CTOR
53  hostIf_WiFi_EndPoint_Profile(int dev_id);
55 
56 public:
57  static class hostIf_WiFi_EndPoint_Profile *getInstance(int dev_id);
58  static GList* getAllInstances();
59  static void closeInstance(hostIf_WiFi_EndPoint_Profile *);
60  static void closeAllInstances();
61 
62  bool Enable;
63  char Status[64];
64  char Alias[64];
65  char SSID[32];
66  char Location[256];
67  char Priority[256];
68 
69  /**
70  * @ingroup TR69_HOSTIF_WIFI_ENDPOINT_PROFILE
71  * @{
72  */
73  /**
74  * @brief Enables or disables the wireless end point Profile table.
75  * When there are multiple WiFi EndPoint Profiles, e.g. each instance supports a different SSID
76  * and/or different security configuration, this parameter can be used to control which
77  * of the instances are currently enabled.
78  *
79  * @param[out] stMsgData TR-069 Host interface message request.
80  *
81  * @return Returns 0 on success, otherwise will return the appropriate error code.
82  */
84 
85  /**
86  * @brief Get the status of the wireless endpoint Profile.
87  *
88  * The following enumeration of the wireless endpoint profile:
89  * - Active
90  * - Available
91  * - Error (OPTIONAL)
92  * - Disabled
93  * The Active value is reserved for the instance that is actively connected. The Available value represents
94  * an instance that is not currently active, but is also not disabled or in error.
95  * The Error value MAY be used by the CPE to indicate a locally defined error condition.
96  *
97  * @param[out] stMsgData TR-069 Host interface message request.
98  *
99  * @return Returns 0 on success, otherwise will return the appropriate error code.
100  */
102 
103  /**
104  * @brief Get the alias name of the wireless end point.
105  *
106  * A non-volatile handle used to reference this instance. Alias provides a mechanism for an ACS to
107  * label this instance for future reference.
108  *
109  * If the CPE supports the Alias-based Addressing feature as defined in [Section 3.6.1/TR-069a4]
110  * and described in [Appendix II/TR-069a4], the following mandatory constraints MUST be enforced:
111  * - Its value MUST NOT be empty.
112  * - Its value MUST start with a letter.
113  * - If its value is not assigned by the ACS, it MUST start with a "cpe-" prefix.
114  * - The CPE MUST NOT change the parameter value.
115  *
116  * @param[out] stMsgData TR-069 Host interface message request.
117  *
118  * @return Returns 0 on success, otherwise will return the appropriate error code.
119  */
121 
122  /**
123  * @brief Get the profile identifier in use by the connection.
124  *
125  * The SSID is an identifier that is attached to packets sent over the wireless LAN that functions
126  * as an ID for joining a particular radio network (BSS).
127  *
128  * @param[out] stMsgData TR-069 Host interface message request.
129  *
130  * @return Returns 0 on success, otherwise will return the appropriate error code.
131  */
133 
134  /**
135  * @brief Get the location of the profile.
136  *
137  * This value serves as a reminder from the user, describing the location of the profile. For example: "Home",
138  * "Office", "Neighbor House", "Airport", etc. An empty string is also valid.
139  *
140  * @param[out] stMsgData TR-069 Host interface message request.
141  *
142  * @return Returns 0 on success, otherwise will return the appropriate error code.
143  */
145 
146  /**
147  * @brief Get the profile priority defines one of the criteria used by the End Point to automatically
148  * select the "best" access point when several APs with known profiles are simultaneously available
149  * for association.
150  *
151  * In this situation, the End Point has to select the AP with the higher priority in its profile.
152  * If there are several APs with the same priority, providing different SSID or the same SSID, then the wireless
153  * end point has to select the APs according to other criteria like signal quality, SNR, etc.
154  *
155  * @note 0 is the highest priority.
156  *
157  * @param[out] stMsgData TR-069 Host interface message request.
158  *
159  * @return Returns 0 on success, otherwise will return the appropriate error code.
160  */
162 
163  /** @} */ //End of Doxygen tag TR69_HOSTIF_WIFI_ENDPOINT_PROFILE
164 };
165 
166 
167 #endif /* DEVICE_WIFI_ENDPOINT_PROFILE_H_ */
168 
169 
170 /** @} */
171 /** @} */
hostIf_WiFi_EndPoint_Profile::get_hostIf_WiFi_EndPoint_Profile_Priority
int get_hostIf_WiFi_EndPoint_Profile_Priority(HOSTIF_MsgData_t *stMsgData)
Get the profile priority defines one of the criteria used by the End Point to automatically select th...
_HostIf_MsgData_t
Definition: hostIf_tr69ReqHandler.h:170
hostIf_WiFi_EndPoint_Profile::get_hostIf_WiFi_EndPoint_Profile_Enable
int get_hostIf_WiFi_EndPoint_Profile_Enable(HOSTIF_MsgData_t *stMsgData)
Enables or disables the wireless end point Profile table. When there are multiple WiFi EndPoint Profi...
hostIf_main.h
hostIf_main API.
hostIf_WiFi_EndPoint_Profile::get_hostIf_WiFi_EndPoint_Profile_Alias
int get_hostIf_WiFi_EndPoint_Profile_Alias(HOSTIF_MsgData_t *stMsgData)
Get the alias name of the wireless end point.
hostIf_WiFi_EndPoint_Profile::get_hostIf_WiFi_EndPoint_Profile_Status
int get_hostIf_WiFi_EndPoint_Profile_Status(HOSTIF_MsgData_t *stMsgData)
Get the status of the wireless endpoint Profile.
hostIf_WiFi_EndPoint_Profile::get_hostIf_WiFi_EndPoint_Profile_Location
int get_hostIf_WiFi_EndPoint_Profile_Location(HOSTIF_MsgData_t *stMsgData)
Get the location of the profile.
hostIf_WiFi_EndPoint_Profile::get_hostIf_WiFi_EndPoint_Profile_SSID
int get_hostIf_WiFi_EndPoint_Profile_SSID(HOSTIF_MsgData_t *stMsgData)
Get the profile identifier in use by the connection.
hostIf_WiFi_EndPoint_Profile
Definition: Device_WiFi_EndPoint_Profile.h:48