You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

58 lines
1.2 KiB

/*
* Copyright (c) 2022 Simples Ip, All rights reserved.
* Author: Ródgger Bruno <rodgger.silva@simplesip.com.br>
*/
#ifndef AGI_H
#define AGI_H 1
#define AGI_NORESPONSE( ... ) agi_clear_response( agi_command( __VA_ARGS__ ) )
#define SIZE_NAME_VARIABLE 100
struct agi_parameter {
char *key;
char *value;
struct agi_parameter *next;
};
struct agi_return {
int code;
int result;
char additional[128];
};
#include <stdarg.h>
#include <stddef.h>
typedef struct agi_return s_agi_return;
typedef struct agi_parameter s_agi_parameter;
int ast_agi_stdout(char *str_stdout );
int ast_agi_stdin( char *str_stdin, int n );
int ast_agi_add_param( s_agi_parameter **ast_root, s_agi_parameter *ast_next );
s_agi_parameter *ast_agi( );
int ast_agi_key( char **key, char *line );
int ast_agi_value( char **value, char *line );
int ast_agi_len_char( char *line, char cht );
char *get_param_value(s_agi_parameter *param, char *key);
char *get_param_n(s_agi_parameter *param, int n);
int agi_verbose_all_param(s_agi_parameter *param);
s_agi_return *agi_command( const char *command, ... );
int agi_clear_response( s_agi_return *response );
int define_variable( char *variable, char *value );
#endif