wlmaker
Loading...
Searching...
No Matches
Functions | Variables
plist.c File Reference
#include "plist.h"
#include "grammar.h"
#include "analyzer.h"
#include "parser.h"
Include dependency graph for plist.c:

Functions

static wlmcfg_object_t_wlmcfg_create_object_from_plist_scanner (yyscan_t scanner)
 
wlmcfg_object_twlmcfg_create_object_from_plist_string (const char *buf_ptr)
 
wlmcfg_object_twlmcfg_create_object_from_plist_data (const uint8_t *data_ptr, size_t data_size)
 
wlmcfg_object_twlmcfg_create_object_from_plist_file (const char *fname_ptr)
 
static void test_from_string (bs_test_t *test_ptr)
 
static void test_from_file (bs_test_t *test_ptr)
 
static void test_from_data (bs_test_t *test_ptr)
 

Variables

const bs_test_case_t wlmcfg_plist_test_cases []
 

Detailed Description

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

https://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.

Function Documentation

◆ _wlmcfg_create_object_from_plist_scanner()

wlmcfg_object_t * _wlmcfg_create_object_from_plist_scanner ( yyscan_t scanner)
static

Does a parser run, from the initialized scanner.

◆ test_from_data()

void test_from_data ( bs_test_t * test_ptr)
static

Tests plist object creation from a sized data buffer.

◆ test_from_file()

void test_from_file ( bs_test_t * test_ptr)
static

Tests plist object creation from string.

◆ test_from_string()

void test_from_string ( bs_test_t * test_ptr)
static

Tests plist object creation from string.

◆ wlmcfg_create_object_from_plist_data()

wlmcfg_object_t * wlmcfg_create_object_from_plist_data ( const uint8_t * data_ptr,
size_t data_size )

Parses the plist data with given size and returns the de-serialized object.

Parameters
data_ptr
data_size
Returns
The de-serialized object, or NULL on error.

◆ wlmcfg_create_object_from_plist_file()

wlmcfg_object_t * wlmcfg_create_object_from_plist_file ( const char * fname_ptr)

Parses the file fname_ptr and returns the de-serialized object.

Parameters
fname_ptr
Returns
The de-serialized object, or NULL on error.

◆ wlmcfg_create_object_from_plist_string()

wlmcfg_object_t * wlmcfg_create_object_from_plist_string ( const char * buf_ptr)

Parses the plist string buf_ptr and returns the de-serialized object.

Parameters
buf_ptr
Returns
The de-serialized object, or NULL on error.

Variable Documentation

◆ wlmcfg_plist_test_cases

const bs_test_case_t wlmcfg_plist_test_cases[]
Initial value:
= {
{ 1, "from_string", test_from_string },
{ 1, "from_file", test_from_file },
{ 1, "from_data", test_from_data },
{ 0, NULL, NULL }
}
static void test_from_data(bs_test_t *test_ptr)
Definition plist.c:264
static void test_from_file(bs_test_t *test_ptr)
Definition plist.c:221
static void test_from_string(bs_test_t *test_ptr)
Definition plist.c:131

Unit tests for the plist parser.