SDL Visual Test: C:/Users/DELL/Work/sdlvisualtest/visualtest/include/SDL_visualtest_action_configparser.h File Reference

SDL Visual Test

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
SDL_visualtest_action_configparser.h File Reference

Go to the source code of this file.

## Data Structures
struct | SDLVisualTest_Action
struct | SDLVisualTest_ActionNode
struct | SDLVisualTest_ActionQueue

## Macros
#define | MAX_ACTION_LINE_LENGTH 300

## Typedefs
typedef struct SDLVisualTest_Action | SDLVisualTest_Action
typedef struct SDLVisualTest_ActionNode | SDLVisualTest_ActionNode
typedef struct SDLVisualTest_ActionQueue | SDLVisualTest_ActionQueue

## Enumerations
enum | SDLVisualTest_ActionType { SDL_ACTION_LAUNCH = 0, SDL_ACTION_KILL, SDL_ACTION_QUIT, SDL_ACTION_SCREENSHOT, SDL_ACTION_VERIFY }

## Functions
int | SDLVisualTest_EnqueueAction (SDLVisualTest_ActionQueue *queue, SDLVisualTest_Action action)
int | SDLVisualTest_DequeueAction (SDLVisualTest_ActionQueue *queue)
void | SDLVisualTest_InitActionQueue (SDLVisualTest_ActionQueue *queue)
SDLVisualTest_Action * | SDLVisualTest_GetQueueFront (SDLVisualTest_ActionQueue *queue)
int | SDLVisualTest_IsActionQueueEmpty (SDLVisualTest_ActionQueue *queue)
void | SDLVisualTest_EmptyActionQueue (SDLVisualTest_ActionQueue *queue)
int | SDLVisualTest_InsertIntoActionQueue (SDLVisualTest_ActionQueue *queue, SDLVisualTest_Action action)
int | SDLVisualTest_ParseActionConfig (char *file, SDLVisualTest_ActionQueue *queue)

## Detailed Description

Header file for the parser for action config files.

## Macro Definition Documentation

#define MAX_ACTION_LINE_LENGTH 300

The maximum length of one line in the actions file

## Typedef Documentation

typedef struct SDLVisualTest_Action SDLVisualTest_Action

Struct that defines an action that will be performed on the SUT process at a specific time.

typedef struct SDLVisualTest_ActionNode SDLVisualTest_ActionNode

Struct for a node in the action queue.

typedef struct SDLVisualTest_ActionQueue SDLVisualTest_ActionQueue

Queue structure for actions loaded from the actions config file.

## Enumeration Type Documentation

enum SDLVisualTest_ActionType

Type of the action.

Enumerator
SDL_ACTION_LAUNCH | Launch an application with some given arguments
SDL_ACTION_KILL | Kill the SUT process
SDL_ACTION_QUIT | Quit (Gracefully exit) the SUT process
SDL_ACTION_SCREENSHOT | Take a screenshot of the SUT window
SDL_ACTION_VERIFY | Verify a previously taken screenshot

## Function Documentation

int SDLVisualTest_DequeueAction | ( | SDLVisualTest_ActionQueue * | queue) |  |

Remove an action from the front of the action queue pointed to by `queue`.

Returns
  1 on success, 0 on failure.

void SDLVisualTest_EmptyActionQueue | ( | SDLVisualTest_ActionQueue * | queue) |  |

Dequeues all the elements in the queque pointed to by `queue`.

int SDLVisualTest_EnqueueAction | ( | SDLVisualTest_ActionQueue * | queue,
|  | SDLVisualTest_Action | action
| ) |  |

Add an action pointed to by `action` to the rear of the action queue pointed to by `queue`.

Returns
  1 on success, 0 on failure.

SDLVisualTest_Action* SDLVisualTest_GetQueueFront | ( | SDLVisualTest_ActionQueue * | queue) |  |

Get the action at the front of the action queue pointed to by `queue`. The returned action pointer may become invalid after subsequent dequeues.

Returns
  pointer to the action on success, NULL on failure.

void SDLVisualTest_InitActionQueue | ( | SDLVisualTest_ActionQueue * | queue) |  |

Initialize the action queue pointed to by `queue`.

int SDLVisualTest_InsertIntoActionQueue | ( | SDLVisualTest_ActionQueue * | queue,
|  | SDLVisualTest_Action | action
| ) |  |

Inserts an action `action` into the queue pointed to by `queue` such that the times of actions in the queue increase as we move from the front to the rear.

Returns
  1 on success, 0 on failure.

int SDLVisualTest_IsActionQueueEmpty | ( | SDLVisualTest_ActionQueue * | queue) |  |

Check if the queue pointed to by `queue` is empty or not.

Returns
  1 if the queue is empty, 0 otherwise.

int SDLVisualTest_ParseActionConfig | ( | char * | file,
|  | SDLVisualTest_ActionQueue * | queue
| ) |  |

Parses an action config file with path `file` and populates an action queue pointed to by `queue` with actions.

Returns
  1 on success, 0 on failure.