RDK Documentation (Open Sourced RDK Components)
dcalist.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
22
/**
23
* @defgroup dca
24
* @{
25
**/
26
27
28
29
30
/**
31
* @defgroup dca
32
* @{
33
* @defgroup src
34
* @{
35
**/
36
37
#include <stdio.h>
38
#include <stdlib.h>
39
#include <string.h>
40
#include <unistd.h>
41
#include "glib.h"
42
43
typedef
enum
{
44
INT,
45
STR
46
} DType_t;
47
48
typedef
struct
pclist
{
49
char
*header;
50
char
*pattern;
51
DType_t d_type;
52
union
{
53
int
count;
54
char
*data;
55
};
56
}
pcdata_t
;
57
58
extern
GList *pchead;
59
60
int
insertPCNode
(GList **pch,
char
*pattern,
char
*header, DType_t dtype,
int
count,
char
*data);
61
pcdata_t
*
searchPCNode
(GList *pch,
char
*pattern);
62
void
printPCNodes
(GList *pch);
63
void
clearPCNodes
(GList **pch);
64
65
66
/** @} */
67
68
69
/** @} */
70
/** @} */
71
/** @} */
72
73
74
/** @} */
75
/** @} */
insertPCNode
int insertPCNode(GList **pch, char *pattern, char *header, DType_t dtype, int count, char *data)
To insert a new pattern node at the beginning of the list.
Definition:
dcalist.c:58
clearPCNodes
void clearPCNodes(GList **pch)
To delete/clear all the nodes in the list.
Definition:
dcalist.c:208
searchPCNode
pcdata_t * searchPCNode(GList *pch, char *pattern)
To search node from the list based on the given pattern.
Definition:
dcalist.c:135
printPCNodes
void printPCNodes(GList *pch)
Debug function to print all nodes in the list.
Definition:
dcalist.c:170
pclist
Definition:
dcalist.h:48
components
generic
dca
src
dcalist.h
Generated on Thu Feb 9 2023 06:32:29 for RDK Documentation (Open Sourced RDK Components) by
1.8.17