EpcTools
An event based multi-threaded C++ development framework.
|
Represents a freeDiameter message. More...
#include <efd.h>
Public Member Functions | |
FDDictionaryEntryCommand * | getCommand () |
FDMessage & | add (FDAvp &avp) |
Adds the contents of "avp" to this message. More... | |
FDMessage & | add (FDDictionaryEntryAVP &de, int32_t v) |
Adds an int32_t value to this message. More... | |
FDMessage & | add (FDDictionaryEntryAVP &de, int64_t v) |
Adds an int64_t value to this message. More... | |
FDMessage & | add (FDDictionaryEntryAVP &de, uint32_t v) |
Adds an uint32_t value to this message. More... | |
FDMessage & | add (FDDictionaryEntryAVP &de, uint64_t v) |
Adds an uint64_t value to this message. More... | |
FDMessage & | add (FDDictionaryEntryAVP &de, float v) |
Adds a float value to this message. More... | |
FDMessage & | add (FDDictionaryEntryAVP &de, double v) |
Adds a double value to this message. More... | |
FDMessage & | add (FDDictionaryEntryAVP &de, const char *v) |
Adds a string value to this message. More... | |
FDMessage & | add (FDDictionaryEntryAVP &de, const std::string &v) |
Adds a string value to this message. More... | |
FDMessage & | add (FDDictionaryEntryAVP &de, const char *v, size_t len) |
Adds an octet string value to this message. More... | |
FDMessage & | add (FDDictionaryEntryAVP &de, const uint8_t *v, size_t len) |
Adds an octet string value to this message. More... | |
FDMessage & | add (FDDictionaryEntryAVP &de, const ETime &v) |
Adds a time value to this message. More... | |
FDMessage & | add (FDExtractor &e) |
Adds the AVP's associated with the FDExtractor object to this AVP. More... | |
FDMessage & | add (FDExtractorList &el) |
Adds the AVP's associated with the FDExtractorList object to this AVP. More... | |
FDMessage & | add (FDExtractorAvp &ea) |
Adds the AVP's associated with the FDExtractorAvp object to this AVP. More... | |
FDMessage & | add (FDExtractorAvpList &eal) |
Adds the AVP's associated with the FDExtractorAvpList object to this AVP. More... | |
Bool | get (FDDictionaryEntryAVP &de, int32_t &v) |
Retrieves the int32_t AVP value associated with specified dictionary entry. More... | |
Bool | get (FDDictionaryEntryAVP &de, int64_t &v) |
Retrieves the int64_t AVP value associated with specified dictionary entry. More... | |
Bool | get (FDDictionaryEntryAVP &de, uint32_t &v) |
Retrieves the uint32_t AVP value associated with specified dictionary entry. More... | |
Bool | get (FDDictionaryEntryAVP &de, uint64_t &v) |
Retrieves the uint64_t AVP value associated with specified dictionary entry. More... | |
Bool | get (FDDictionaryEntryAVP &de, float &v) |
Retrieves the float AVP value associated with specified dictionary entry. More... | |
Bool | get (FDDictionaryEntryAVP &de, double &v) |
Retrieves the double AVP value associated with specified dictionary entry. More... | |
Bool | get (FDDictionaryEntryAVP &de, std::string &v) |
Retrieves the string AVP value associated with specified dictionary entry. More... | |
Bool | get (FDDictionaryEntryAVP &de, char *v, size_t &len) |
Retrieves the octet string AVP value associated with specified dictionary entry. More... | |
Bool | get (FDDictionaryEntryAVP &de, uint8_t *v, size_t &len) |
Retrieves the octet string AVP value associated with specified dictionary entry. More... | |
Bool | get (FDDictionaryEntryAVP &de, ETime &v) |
Retrieves the time AVP value associated with specified dictionary entry. More... | |
FDAvp | findAVP (FDDictionaryEntryAVP &de) |
Retrieves the AVP object specified by the dictionary entry from this message. More... | |
FDAvp | getFirstAVP (Bool &found) |
Retrieves the first AVP object from this message. More... | |
Void | dump () |
Prints the AVP contents of this message. More... | |
Bool | isRequest () |
Indicates if this message is a request. More... | |
Bool | isAnswer () |
Indicates if this message is an answer. More... | |
struct msg * | getMsg () |
Retrieves the freeDiameter message pointer. More... | |
Void | addOrigin () |
Adds the Origin-Host and Origin-Realm to this message. More... | |
FDMessage & | addJson (const char *json) |
Adds the AVP's represented in the JSON string. More... | |
FDMessage & | addJson (const std::string &json) |
Adds the AVP's represented in the JSON string. More... | |
Bool | getJson (std::string &json) |
Retrieves a JSON string with all of the AVP's represented in it. More... | |
Protected Member Functions | |
FDMessage (Bool req2ans, FDDictionaryEntryCommand *de, struct msg *pmsg=NULL, Bool dedel=false, Bool msgdel=true) | |
Class constructor. More... | |
FDMessage (FDDictionaryEntryCommand *de, struct msg *pmsg=NULL, Bool dedel=false) | |
Class constructor. More... | |
FDMessage (FDDictionaryEntryApplication *ade, FDDictionaryEntryCommand *cde, struct msg *pmsg=NULL, Bool dedel=false) | |
Class constructor. More... | |
~FDMessage () | |
Class destructor. More... | |
FDMessage & | sendRequest (Void(*anscb)(Void *, struct msg **), FDMessageRequest &req) |
Sends a request message. More... | |
FDMessage & | sendAnswer () |
Sends an answer message;. More... | |
Void | setMsgDelete (Bool v) |
Sets value indicating if the freeDiameter message object is to be deleted when this object is destroyed. More... | |
Represents a freeDiameter message.
|
protected |
Class constructor.
req2ans | indicates to construct an answer message based on the provided request message pointer. |
de | the associated command dictionary entry. |
pmsg | pointer to the freeDiameter message object. |
dedel | indicates if the dictionary entry object is to be destroyed when this object is destroyed. |
msgdel | indicates if the freeDiameter message object is to be free'ed when this object is destroyed. |
FDException |
|
protected |
Class constructor.
de | the associated command dictionary entry. |
pmsg | pointer to the freeDiameter message object. |
dedel | indicates if the dictionary entry object is to be destroyed when this object is destroyed. |
FDException |
|
protected |
Class constructor.
ade | the application dictionary entry. |
cde | the associated command dictionary entry. |
pmsg | pointer to the freeDiameter message object. |
dedel | indicates if the dictionary entry object is to be destroyed when this object is destroyed. |
FDException |
|
protected |
Class destructor.
Adds the contents of "avp" to this message.
avp | the AVP to add. |
FDException |
|
inline |
Adds a string value to this message.
de | the dictionary entry of the AVP to add. |
v | the value to add. |
FDException |
|
inline |
Adds an octet string value to this message.
de | the dictionary entry of the AVP to add. |
v | the value to add. |
len | the length of the octet string to add. |
FDException |
|
inline |
Adds a time value to this message.
de | the dictionary entry of the AVP to add. |
v | the value to add. |
FDException |
|
inline |
Adds a string value to this message.
de | the dictionary entry of the AVP to add. |
v | the value to add. |
FDException |
|
inline |
Adds an octet string value to this message.
de | the dictionary entry of the AVP to add. |
v | the value to add. |
len | the length of the octet string to add. |
FDException |
|
inline |
Adds a double value to this message.
de | the dictionary entry of the AVP to add. |
v | the value to add. |
FDException |
|
inline |
Adds a float value to this message.
de | the dictionary entry of the AVP to add. |
v | the value to add. |
FDException |
|
inline |
Adds an int32_t value to this message.
de | the dictionary entry of the AVP to add. |
v | the value to add. |
FDException |
|
inline |
Adds an int64_t value to this message.
de | the dictionary entry of the AVP to add. |
v | the value to add. |
FDException |
|
inline |
Adds an uint32_t value to this message.
de | the dictionary entry of the AVP to add. |
v | the value to add. |
FDException |
|
inline |
Adds an uint64_t value to this message.
de | the dictionary entry of the AVP to add. |
v | the value to add. |
FDException |
FDMessage & FDMessage::add | ( | FDExtractor & | e | ) |
Adds the AVP's associated with the FDExtractor object to this AVP.
e | the FDExtractor object reference to copy. |
FDException |
FDMessage & FDMessage::add | ( | FDExtractorAvp & | ea | ) |
Adds the AVP's associated with the FDExtractorAvp object to this AVP.
ea | the FDExtractorAvp object reference to copy. |
FDException |
FDMessage & FDMessage::add | ( | FDExtractorAvpList & | eal | ) |
Adds the AVP's associated with the FDExtractorAvpList object to this AVP.
eal | the FDExtractorAvpList object reference to copy. |
FDException |
FDMessage & FDMessage::add | ( | FDExtractorList & | el | ) |
Adds the AVP's associated with the FDExtractorList object to this AVP.
el | the FDExtractor object reference to copy. |
FDException |
FDMessage & FDMessage::addJson | ( | const char * | json | ) |
Adds the AVP's represented in the JSON string.
json | the JSON string. |
FDException |
|
inline |
Adds the AVP's represented in the JSON string.
json | the JSON string. |
FDException |
Void FDMessage::addOrigin | ( | ) |
Adds the Origin-Host and Origin-Realm to this message.
FDException |
Void FDMessage::dump | ( | ) |
Prints the AVP contents of this message.
FDAvp FDMessage::findAVP | ( | FDDictionaryEntryAVP & | de | ) |
Retrieves the AVP object specified by the dictionary entry from this message.
de | the AVP dictionary entry to search for. |
FDException |
|
inline |
Retrieves the octet string AVP value associated with specified dictionary entry.
de | the dictionary entry of the AVP to retrieve. |
v | the variable to populate. |
len | the maximum length of the octet string. |
FDException |
|
inline |
Retrieves the double AVP value associated with specified dictionary entry.
de | the dictionary entry of the AVP to retrieve. |
v | the variable to populate. |
FDException |
|
inline |
Retrieves the time AVP value associated with specified dictionary entry.
de | the dictionary entry of the AVP to retrieve. |
v | the variable to populate. |
FDException |
|
inline |
Retrieves the float AVP value associated with specified dictionary entry.
de | the dictionary entry of the AVP to retrieve. |
v | the variable to populate. |
FDException |
|
inline |
Retrieves the int32_t AVP value associated with specified dictionary entry.
de | the dictionary entry of the AVP to retrieve. |
v | the variable to populate. |
FDException |
|
inline |
Retrieves the int64_t AVP value associated with specified dictionary entry.
de | the dictionary entry of the AVP to retrieve. |
v | the variable to populate. |
FDException |
|
inline |
Retrieves the string AVP value associated with specified dictionary entry.
de | the dictionary entry of the AVP to retrieve. |
v | the variable to populate. |
FDException |
|
inline |
Retrieves the uint32_t AVP value associated with specified dictionary entry.
de | the dictionary entry of the AVP to retrieve. |
v | the variable to populate. |
FDException |
|
inline |
Retrieves the uint64_t AVP value associated with specified dictionary entry.
de | the dictionary entry of the AVP to retrieve. |
v | the variable to populate. |
FDException |
|
inline |
Retrieves the octet string AVP value associated with specified dictionary entry.
de | the dictionary entry of the AVP to retrieve. |
v | the variable to populate. |
len | the maximum length of the octet string. |
FDException |
|
inline |
FDAvp FDMessage::getFirstAVP | ( | Bool & | found | ) |
Retrieves the first AVP object from this message.
found | indicates if the first entry was found. |
FDException |
Bool FDMessage::getJson | ( | std::string & | json | ) |
|
inline |
Retrieves the freeDiameter message pointer.
|
inline |
Indicates if this message is an answer.
|
inline |
Indicates if this message is a request.
|
protected |
|
protected |
Sends a request message.
anscb | an answer callback function pointer. |
req | The request message to send. |
FDException |
|
inlineprotected |
Sets value indicating if the freeDiameter message object is to be deleted when this object is destroyed.
v | True to delete the freeDiameter message pointer, otherwise False. |