All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Headless Main

This is the main module of the terminal (GUI-less) client. More...

Functions

static bool apme_prompt (char *prompt, char *answer)
 
static void apme_chatlog_check (void)
 
static void apme_screen_update (void)
 
static void apme_sys_elevate (void)
 
static void apme_event_handler (enum event_type ev)
 
static bool apme_init (int argc, char *argv[])
 
static void apme_cfg_apply (void)
 
static void apme_periodic (void)
 
int old (int argc, char *argv[])
 

Detailed Description

This is the main module of the terminal (GUI-less) client.

Function Documentation

void apme_cfg_apply ( void  )
static

Check the environment and set the environment name

void apme_chatlog_check ( void  )
static

Check if the chatlog is enabled

If the chatlog is not enabled, ask the user for permission to enable it

void apme_event_handler ( enum event_type  ev)
static

This is the "catch all events" function

In the current implementation, this just calls the screen update function

bool apme_init ( int  argc,
char *  argv[] 
)
static

Initialize the application:

  • Initialize the debug console
  • Initialize the Aion subsystem
  • Initialize the chatlog engine
  • Register events
Parameters
[in]argcArgument number (passed from main) – not used
[in]argvArgument array (passed from main) – not used
Return values
trueOn success
falseIf it fails to initialize the aion sub-system
falseIf it fails to initialize the chatlog engine
void apme_periodic ( void  )
static

The periodic function, this is called by the main loop periodically

It polls the clipboard for commands and the chatlog for new text

bool apme_prompt ( char *  prompt,
char *  answer 
)
static

Simple "prompt a question and wait for an answer" function

This is mainly used during startup to ask various questions

Parameters
[in]promptText to prompt
[in]answerExpected answer
Returns
If the answer is equals to the answer parameter return true, otherwise false
void apme_screen_update ( void  )
static

Updates the applications main terminal screen

This is usually called in response to certain events

void apme_sys_elevate ( void  )
static

Respawn a new instance of the current executable with Admin privileges. If this operation is successfull, the current process will terminate.

Note
This function will trigger the UAC prompt.
int old ( int  argc,
char *  argv[] 
)

The terminal application main entry function

Parameters
[in]argcArgument number (passed from main) – not used
[in]argvArgument array (passed from main) – not used
Returns
0 on success, any other number on error.