Asterisk - The Open Source Telephony Project GIT-master-f36a736
Data Fields
ast_aeap_message_type Struct Reference

Message type virtual method table. More...

#include <res_aeap_message.h>

Data Fields

int(* construct1 )(struct ast_aeap_message *self, const void *params)
 Construct/Initialize a message object. More...
 
int(* construct2 )(struct ast_aeap_message *self, const char *msg_type, const char *name, const char *id, const void *params)
 Construct/Initialize a message object. More...
 
void *(* data )(struct ast_aeap_message *self)
 Retrieve the core message data/body. More...
 
int(* deserialize )(struct ast_aeap_message *self, const void *buf, intmax_t size)
 Deserialize the given buffer into a message object. More...
 
void(* destruct )(struct ast_aeap_message *self)
 Destruct/Cleanup object resources. More...
 
const char *(* error_msg )(const struct ast_aeap_message *self)
 Retrieve the error message if it has one. More...
 
int(* error_msg_set )(struct ast_aeap_message *self, const char *error_msg)
 Set an error message. More...
 
const char *(* id )(const struct ast_aeap_message *self)
 Retrieve a message id. More...
 
int(* id_set )(struct ast_aeap_message *self, const char *id)
 Set a message id. More...
 
int(* is_request )(const struct ast_aeap_message *self)
 Retrieve whether or not this is a request message. More...
 
int(* is_response )(const struct ast_aeap_message *self)
 Retrieve whether or not this is a response message. More...
 
const char *(* name )(const struct ast_aeap_message *self)
 Retrieve a message name. More...
 
enum AST_AEAP_DATA_TYPE serial_type
 
int(* serialize )(const struct ast_aeap_message *self, void **buf, intmax_t *size)
 Serialize the message object into byte/char buffer. More...
 
const char * type_name
 
size_t type_size
 

Detailed Description

Message type virtual method table.

Definition at line 35 of file res_aeap_message.h.

Field Documentation

◆ construct1

int(* construct1) (struct ast_aeap_message *self, const void *params)

Construct/Initialize a message object.

Parameters
selfThe message object to initialize
paramsOther optional parameter(s) to possibly use
Returns
0 on success, -1 on error

Definition at line 51 of file res_aeap_message.h.

◆ construct2

int(* construct2) (struct ast_aeap_message *self, const char *msg_type, const char *name, const char *id, const void *params)

Construct/Initialize a message object.

Parameters
selfThe message object to initialize
msg_typeThe type of message (e.g. request or response)
nameThe name of the message
idThe message id
paramsOther optional parameter(s) to possibly use
Returns
0 on success, -1 on error

Definition at line 64 of file res_aeap_message.h.

◆ data

void *(* data) (struct ast_aeap_message *self)

Retrieve the core message data/body.

Parameters
selfThis message object

Definition at line 129 of file res_aeap_message.h.

◆ deserialize

int(* deserialize) (struct ast_aeap_message *self, const void *buf, intmax_t size)

Deserialize the given buffer into a message object.

Parameters
selfThe message object to deserialize into
bufThe buffer to deserialize
sizeThe size/length of the buffer
Returns
0 on success, -1 on error

Definition at line 83 of file res_aeap_message.h.

◆ destruct

void(* destruct) (struct ast_aeap_message *self)

Destruct/Cleanup object resources.

Parameters
selfThe message object being destructed

Definition at line 72 of file res_aeap_message.h.

Referenced by message_destructor().

◆ error_msg

const char *(* error_msg) (const struct ast_aeap_message *self)

Retrieve the error message if it has one.

Parameters
selfThe message object
Returns
The error message if available, or NULL

Definition at line 156 of file res_aeap_message.h.

◆ error_msg_set

int(* error_msg_set) (struct ast_aeap_message *self, const char *error_msg)

Set an error message.

Parameters
selfThe message object
error_msgThe error message string to set
Returns
0 on success, -1 on error

Definition at line 166 of file res_aeap_message.h.

◆ id

const char *(* id) (const struct ast_aeap_message *self)

Retrieve a message id.

Parameters
selfThe message object
Returns
The message id

Definition at line 103 of file res_aeap_message.h.

Referenced by Section::__cmp__(), Section::__eq__(), Section::__ge__(), Section::__gt__(), Section::__le__(), Section::__lt__(), and Model::load().

◆ id_set

int(* id_set) (struct ast_aeap_message *self, const char *id)

Set a message id.

Parameters
selfThe message object
idThe id to set
Returns
0 on success, -1 on error

Definition at line 113 of file res_aeap_message.h.

◆ is_request

int(* is_request) (const struct ast_aeap_message *self)

Retrieve whether or not this is a request message.

Parameters
selfThe message object
Returns
True if message is a request, false otherwise

Definition at line 138 of file res_aeap_message.h.

◆ is_response

int(* is_response) (const struct ast_aeap_message *self)

Retrieve whether or not this is a response message.

Parameters
selfThe message object
Returns
True if message is a response, false otherwise

Definition at line 147 of file res_aeap_message.h.

◆ name

const char *(* name) (const struct ast_aeap_message *self)

Retrieve a message name.

Parameters
selfThe message object
Returns
The message name

Definition at line 122 of file res_aeap_message.h.

Referenced by PathSegment::get_child(), Parameter::load(), Property::load(), and SwaggerType::load().

◆ serial_type

enum AST_AEAP_DATA_TYPE serial_type

The type to serialize to, and de-serialize from

Definition at line 41 of file res_aeap_message.h.

Referenced by ast_aeap_send_msg().

◆ serialize

int(* serialize) (const struct ast_aeap_message *self, void **buf, intmax_t *size)

Serialize the message object into byte/char buffer.

Parameters
selfThe message object to serialize
buf[out] The buffer to hold the "packed" data
size[out] The size of the data written to the buffer
Returns
0 on success, -1 on error

Definition at line 94 of file res_aeap_message.h.

◆ type_name

const char* type_name

The name of this type

Definition at line 39 of file res_aeap_message.h.

◆ type_size

size_t type_size

The size of the message implementation type. Used for allocations.

Definition at line 37 of file res_aeap_message.h.


The documentation for this struct was generated from the following file: