Home --> Documentations --> PJLIB-UTIL Reference

Data Structures
cli_console.h File Reference

Command Line Interface Console Front End API. More...

Go to the source code of this file.

Data Structures

struct  pj_cli_console_cfg


void pj_cli_console_cfg_default (pj_cli_console_cfg *param)
pj_status_t pj_cli_console_create (pj_cli_t *cli, const pj_cli_console_cfg *param, pj_cli_sess **p_sess, pj_cli_front_end **p_fe)
pj_status_t pj_cli_console_process (pj_cli_sess *sess, char *buf, unsigned maxlen)

Detailed Description

Command Line Interface Console Front End API.

Function Documentation

void pj_cli_console_cfg_default ( pj_cli_console_cfg param)

Initialize pj_cli_console_cfg with its default values.

paramThe structure to be initialized.
pj_status_t pj_cli_console_create ( pj_cli_t cli,
const pj_cli_console_cfg param,
pj_cli_sess **  p_sess,
pj_cli_front_end **  p_fe 

Create a console front-end for the specified CLI application, and return the only session instance for the console front end. On Windows operating system, this may open a new console window.

cliThe CLI application instance.
paramOptional console CLI parameters. If this value is NULL, default parameters will be used.
p_sessPointer to receive the session instance for the console front end.
p_feOptional pointer to receive the front-end instance of the console front-end just created.
PJ_SUCCESS on success, or the appropriate error code.
pj_status_t pj_cli_console_process ( pj_cli_sess sess,
char *  buf,
unsigned  maxlen 

Retrieve a cmdline from console stdin and process the input accordingly.

sessThe CLI session.
bufPointer to receive the buffer.
maxlenMaximum length to read.
PJ_SUCCESS if an input was read


PJLIB-UTIL Open Source, small footprint, and portable asynchronous/caching DNS resolver, text scanner, STUN client, and XML library
Copyright (C) 2006-2009 Teluu Inc.