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

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SDL_visualtest_action_configparser.h
Go to the documentation of this file.
/* See COPYING.txt for the full license governing this code. */
#ifndef _SDL_visualtest_action_configparser_h
#define _SDL_visualtest_action_configparser_h
#define MAX_ACTION_LINE_LENGTH 300
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
typedef enum
{
SDL_ACTION_LAUNCH = 0,
SDL_ACTION_KILL,
SDL_ACTION_QUIT,
SDL_ACTION_SCREENSHOT,
SDL_ACTION_VERIFY
} SDLVisualTest_ActionType;
typedef struct SDLVisualTest_Action
{
SDLVisualTest_ActionType type;
int time;
union
{
struct
{
char* path;
char* args;
} process;
} extra;
} SDLVisualTest_Action;
typedef struct SDLVisualTest_ActionNode
{
SDLVisualTest_Action action;
struct SDLVisualTest_ActionNode* next;
} SDLVisualTest_ActionNode;
typedef struct SDLVisualTest_ActionQueue
{
SDLVisualTest_ActionNode* front;
SDLVisualTest_ActionNode* rear;
int size;
} SDLVisualTest_ActionQueue;
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);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#endif /* _SDL_visualtest_action_configparser_h */