Prettify TCAP classes : add empty line between method definitions in TCAP classes.

git-svn-id: http://yate.null.ro/svn/yate/trunk@4691 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
oana 2011-11-10 15:27:44 +00:00
parent 42429ec0c3
commit a916040db3
1 changed files with 144 additions and 0 deletions

View File

@ -10348,24 +10348,28 @@ public:
inline SS7TCAPMessage(NamedList& params, DataBlock& data, bool notice = false) inline SS7TCAPMessage(NamedList& params, DataBlock& data, bool notice = false)
: m_msgParams(params), m_msgData(data), m_notice(notice) : m_msgParams(params), m_msgData(data), m_notice(notice)
{} {}
/** /**
* Get the SCCP parameters * Get the SCCP parameters
* @return NamedList reference containing information from the SCCP level * @return NamedList reference containing information from the SCCP level
*/ */
inline NamedList& msgParams() inline NamedList& msgParams()
{ return m_msgParams; } { return m_msgParams; }
/** /**
* Get the TCAP message data * Get the TCAP message data
* @return DataBlock representing the encoded TCAP message * @return DataBlock representing the encoded TCAP message
*/ */
inline DataBlock& msgData() inline DataBlock& msgData()
{ return m_msgData; } { return m_msgData; }
/** /**
* Is this message a notice or a normal message? * Is this message a notice or a normal message?
* @return True if message is a notice, false otherwise * @return True if message is a notice, false otherwise
*/ */
inline bool& isNotice() inline bool& isNotice()
{ return m_notice; } { return m_notice; }
private: private:
NamedList m_msgParams; NamedList m_msgParams;
DataBlock m_msgData; DataBlock m_msgData;
@ -10388,6 +10392,7 @@ public:
ITUTCAP, ITUTCAP,
ANSITCAP, ANSITCAP,
}; };
/** /**
* Component handling primitives between TCAP and TCAP user (TC-user) * Component handling primitives between TCAP and TCAP user (TC-user)
*/ */
@ -10404,6 +10409,7 @@ public:
TC_U_Cancel = 10, // User Cancel primitive - Request, TC-user request cancellation of an operation TC_U_Cancel = 10, // User Cancel primitive - Request, TC-user request cancellation of an operation
TC_TimerReset = 11, // Timer Reset - Indication, allow TC-user to refresh an operation timer TC_TimerReset = 11, // Timer Reset - Indication, allow TC-user to refresh an operation timer
}; };
/** /**
* TCAP message primitives * TCAP message primitives
*/ */
@ -10422,6 +10428,7 @@ public:
TC_P_Abort, // ITU-T & ANSI - Indication, notify the abort of a dialogue because of a protocol error TC_P_Abort, // ITU-T & ANSI - Indication, notify the abort of a dialogue because of a protocol error
TC_Notice, // ITU-T & ANSI - Indication, notify the TC-user that the network was unable to provide the requested service TC_Notice, // ITU-T & ANSI - Indication, notify the TC-user that the network was unable to provide the requested service
}; };
/** /**
* Component Operation Classes * Component Operation Classes
*/ */
@ -10431,6 +10438,7 @@ public:
SuccessOnlyReport = 3, SuccessOnlyReport = 3,
NoReport = 4, NoReport = 4,
}; };
/** /**
* Type of message counters * Type of message counters
*/ */
@ -10441,27 +10449,32 @@ public:
NormalMsgs, NormalMsgs,
AbnormalMsgs, AbnormalMsgs,
}; };
/** /**
* Constructor * Constructor
* @param params Parameters for building this TCAP * @param params Parameters for building this TCAP
*/ */
SS7TCAP(const NamedList& params); SS7TCAP(const NamedList& params);
/** /**
* Destructor * Destructor
*/ */
virtual ~SS7TCAP(); virtual ~SS7TCAP();
/** /**
* Configure and initialize the component and any subcomponents it may have * Configure and initialize the component and any subcomponents it may have
* @param config Optional configuration parameters override * @param config Optional configuration parameters override
* @return True if the component was initialized properly * @return True if the component was initialized properly
*/ */
virtual bool initialize(const NamedList* config); virtual bool initialize(const NamedList* config);
/** /**
* Send a message to SCCP for transport, inherited from SCCPUser * Send a message to SCCP for transport, inherited from SCCPUser
* @param data User data * @param data User data
* @param params SCCP parameters * @param params SCCP parameters
*/ */
virtual bool sendData(DataBlock& data, NamedList& params); virtual bool sendData(DataBlock& data, NamedList& params);
/** /**
* Notification from SCCP that a message has arrived, inherited from SCCPUser * Notification from SCCP that a message has arrived, inherited from SCCPUser
* @param data Received user data * @param data Received user data
@ -10469,6 +10482,7 @@ public:
* @return True if this user has processed the message, false otherwise * @return True if this user has processed the message, false otherwise
*/ */
virtual HandledMSU receivedData(DataBlock& data, NamedList& params); virtual HandledMSU receivedData(DataBlock& data, NamedList& params);
/** /**
* Notification from SCCP that a message failed to arrive to its destination, inherited from SCCPUser * Notification from SCCP that a message failed to arrive to its destination, inherited from SCCPUser
* @param data User data sent. * @param data User data sent.
@ -10477,81 +10491,97 @@ public:
* but it must always must contain the first segment * but it must always must contain the first segment
*/ */
virtual HandledMSU notifyData(DataBlock& data, NamedList& params); virtual HandledMSU notifyData(DataBlock& data, NamedList& params);
/** /**
* Notification from SCCP layer about management status * Notification from SCCP layer about management status
* @param type Type of management notification * @param type Type of management notification
* @param params Notification params * @param params Notification params
*/ */
bool managementNotify(SCCP::Type type, NamedList& params); bool managementNotify(SCCP::Type type, NamedList& params);
/** /**
* Attach a SS7 TCAP user * Attach a SS7 TCAP user
* @param user Pointer to the TCAP user to attach * @param user Pointer to the TCAP user to attach
*/ */
void attach(TCAPUser* user); void attach(TCAPUser* user);
/** /**
* Detach a SS7 TCAP user * Detach a SS7 TCAP user
* @param user TCAP user to detach * @param user TCAP user to detach
*/ */
void detach(TCAPUser* user); void detach(TCAPUser* user);
/** /**
* A TCAP user made a request * A TCAP user made a request
* @param requestParams NamedList containing all the necessary data for the TCAP request * @param requestParams NamedList containing all the necessary data for the TCAP request
* @return A SS7TCAPError reporting the status of the request * @return A SS7TCAPError reporting the status of the request
*/ */
virtual SS7TCAPError userRequest(NamedList& requestParams); virtual SS7TCAPError userRequest(NamedList& requestParams);
/** /**
* Process received SCCP data * Process received SCCP data
* @param sccpData A TCAP message received from SCCP to process * @param sccpData A TCAP message received from SCCP to process
* @return A code specifying if this message was handled * @return A code specifying if this message was handled
*/ */
virtual HandledMSU processSCCPData(SS7TCAPMessage* sccpData); virtual HandledMSU processSCCPData(SS7TCAPMessage* sccpData);
/** /**
* Report which TCAP implementation is in use * Report which TCAP implementation is in use
*/ */
inline TCAPType tcapType() inline TCAPType tcapType()
{ return m_tcapType; } { return m_tcapType; }
/** /**
* Set TCAP version * Set TCAP version
* @param type TCAP version * @param type TCAP version
*/ */
inline void setTCAPType(TCAPType type) inline void setTCAPType(TCAPType type)
{ m_tcapType = type; } { m_tcapType = type; }
/** /**
* Enqueue data received from SCCP as a TCAP message, kept in a processing queue * Enqueue data received from SCCP as a TCAP message, kept in a processing queue
* @param msg A SS7TCAPMessage pointer containing all data received from SSCP * @param msg A SS7TCAPMessage pointer containing all data received from SSCP
*/ */
virtual void enqueue(SS7TCAPMessage* msg); virtual void enqueue(SS7TCAPMessage* msg);
/** /**
* Dequeue a TCAP message when ready to process it * Dequeue a TCAP message when ready to process it
* @return A SS7TCAPMessage pointer dequeued from the queue * @return A SS7TCAPMessage pointer dequeued from the queue
*/ */
virtual SS7TCAPMessage* dequeue(); virtual SS7TCAPMessage* dequeue();
/** /**
* Get a new transaction ID * Get a new transaction ID
* @return A transaction ID * @return A transaction ID
*/ */
virtual const String allocTransactionID(); virtual const String allocTransactionID();
/** /**
* Get a new transaction ID * Get a new transaction ID
* @param str String into which to put the id * @param str String into which to put the id
*/ */
void allocTransactionID(String& str); void allocTransactionID(String& str);
/** /**
* Dictionary for TCAP versions * Dictionary for TCAP versions
*/ */
static const TokenDict s_tcapVersion[]; static const TokenDict s_tcapVersion[];
/** /**
* Dictionary for component primitives * Dictionary for component primitives
*/ */
static const TokenDict s_compPrimitives[]; static const TokenDict s_compPrimitives[];
/** /**
* Dictionary for transaction primitives * Dictionary for transaction primitives
*/ */
static const TokenDict s_transPrimitives[]; static const TokenDict s_transPrimitives[];
/** /**
* Dictionary for component opearation classes * Dictionary for component opearation classes
*/ */
static const TokenDict s_compOperClasses[]; static const TokenDict s_compOperClasses[];
/** /**
* Build a transaction * Build a transaction
* @param type Type with which to build the transactions * @param type Type with which to build the transactions
@ -10562,44 +10592,52 @@ public:
*/ */
virtual SS7TCAPTransaction* buildTransaction(SS7TCAP::TCAPUserTransActions type, const String& transactID, NamedList& params, virtual SS7TCAPTransaction* buildTransaction(SS7TCAP::TCAPUserTransActions type, const String& transactID, NamedList& params,
bool initLocal = true) = 0; bool initLocal = true) = 0;
/** /**
* Find the transaction with the given id * Find the transaction with the given id
* @param tid Searched local id * @param tid Searched local id
* @return A pointer to the transaction or null if not found * @return A pointer to the transaction or null if not found
*/ */
SS7TCAPTransaction* getTransaction(const String& tid); SS7TCAPTransaction* getTransaction(const String& tid);
/** /**
* Remove transaction * Remove transaction
* @param tr The transaction to remove * @param tr The transaction to remove
*/ */
void removeTransaction(SS7TCAPTransaction* tr); void removeTransaction(SS7TCAPTransaction* tr);
/** /**
* Method called periodically to do processing and timeout checks * Method called periodically to do processing and timeout checks
* @param when Time to use as computing base for events and timeouts * @param when Time to use as computing base for events and timeouts
*/ */
virtual void timerTick(const Time& when); virtual void timerTick(const Time& when);
/** /**
* Send to TCAP users a decode message * Send to TCAP users a decode message
* @param params Message in NamedList form * @param params Message in NamedList form
* @return True if the message was handled by a user, false otherwise * @return True if the message was handled by a user, false otherwise
*/ */
virtual bool sendToUser(NamedList& params); virtual bool sendToUser(NamedList& params);
/** /**
* Build SCCP data * Build SCCP data
* @param params NamedList containing the parameters to be given to SCCP * @param params NamedList containing the parameters to be given to SCCP
* @param tr Transaction for which to build SCCP data * @param tr Transaction for which to build SCCP data
*/ */
virtual void buildSCCPData(NamedList& params, SS7TCAPTransaction* tr); virtual void buildSCCPData(NamedList& params, SS7TCAPTransaction* tr);
/** /**
* Status of TCAP * Status of TCAP
* @param status NamedList to fill with status information * @param status NamedList to fill with status information
*/ */
virtual void status(NamedList& status); virtual void status(NamedList& status);
/** /**
* Status of TCAP users * Status of TCAP users
* @param status NamedList to fill with user status information * @param status NamedList to fill with user status information
*/ */
virtual void userStatus(NamedList& status); virtual void userStatus(NamedList& status);
/** /**
* Handle an decoding error * Handle an decoding error
* @param error The encoutered error * @param error The encoutered error
@ -10609,6 +10647,7 @@ public:
* @return Status if the error was handled or not * @return Status if the error was handled or not
*/ */
virtual HandledMSU handleError(SS7TCAPError& error, NamedList& params, DataBlock& data, SS7TCAPTransaction* tr = 0); virtual HandledMSU handleError(SS7TCAPError& error, NamedList& params, DataBlock& data, SS7TCAPTransaction* tr = 0);
/** /**
* Increment one of the status counters * Increment one of the status counters
* @param counterType The type of the counter to increment * @param counterType The type of the counter to increment
@ -10635,6 +10674,7 @@ public:
break; break;
} }
} }
/** /**
* Retrieve one of the status counters * Retrieve one of the status counters
* @param counterType The type of the counter to increment * @param counterType The type of the counter to increment
@ -10658,6 +10698,7 @@ public:
} }
return 0; return 0;
} }
/** /**
* Get the type of transaction in string form * Get the type of transaction in string form
* @param tr Type of transaction * @param tr Type of transaction
@ -10665,6 +10706,7 @@ public:
*/ */
static inline const char* lookupTransaction(int tr) static inline const char* lookupTransaction(int tr)
{ return lookup(tr,s_transPrimitives,"Unknown"); } { return lookup(tr,s_transPrimitives,"Unknown"); }
/** /**
* Get the type of transaction from string form * Get the type of transaction from string form
* @param tr Type of transaction in string form * @param tr Type of transaction in string form
@ -10672,6 +10714,7 @@ public:
*/ */
static inline int lookupTransaction(const char* tr) static inline int lookupTransaction(const char* tr)
{ return lookup(tr,s_transPrimitives,TC_Unknown); } { return lookup(tr,s_transPrimitives,TC_Unknown); }
/** /**
* Get the type of component in string form * Get the type of component in string form
* @param comp Type of component * @param comp Type of component
@ -10679,6 +10722,7 @@ public:
*/ */
static inline const char* lookupComponent(int comp) static inline const char* lookupComponent(int comp)
{ return lookup(comp,s_compPrimitives,"Unknown"); } { return lookup(comp,s_compPrimitives,"Unknown"); }
/** /**
* Get the type of component from string form * Get the type of component from string form
* @param comp Type of component * @param comp Type of component
@ -10773,43 +10817,51 @@ public:
Discard, Discard,
NoError, NoError,
}; };
/** /**
* Constructor * Constructor
* @param tcapType TCAP specification user for this error * @param tcapType TCAP specification user for this error
*/ */
SS7TCAPError(SS7TCAP::TCAPType tcapType); SS7TCAPError(SS7TCAP::TCAPType tcapType);
/** /**
* Constructor * Constructor
* @param tcapType TCAP specification used for this error * @param tcapType TCAP specification used for this error
* @param error The error * @param error The error
*/ */
SS7TCAPError(SS7TCAP::TCAPType tcapType, ErrorType error); SS7TCAPError(SS7TCAP::TCAPType tcapType, ErrorType error);
/** /**
* Destructor * Destructor
*/ */
~SS7TCAPError(); ~SS7TCAPError();
/** /**
* Get the error * Get the error
* @return The TCAP error * @return The TCAP error
*/ */
inline ErrorType error() inline ErrorType error()
{ return m_error; } { return m_error; }
/** /**
* Set the error * Set the error
* @param error Error to set * @param error Error to set
*/ */
inline void setError(ErrorType error) inline void setError(ErrorType error)
{ m_error = error; } { m_error = error; }
/** /**
* Error name * Error name
* @return The error name * @return The error name
*/ */
const String errorName(); const String errorName();
/** /**
* The full value of the error * The full value of the error
* @return 2 byte integer containing the full code of the error * @return 2 byte integer containing the full code of the error
*/ */
u_int16_t errorCode(); u_int16_t errorCode();
/** /**
* Obtain abstract TCAP error from TCAP protocol defined error value * Obtain abstract TCAP error from TCAP protocol defined error value
* @param tcapType Type of TCAP for which the error is searched * @param tcapType Type of TCAP for which the error is searched
@ -10817,6 +10869,7 @@ public:
* @return The type of the error * @return The type of the error
*/ */
static int errorFromCode(SS7TCAP::TCAPType tcapType, u_int16_t code); static int errorFromCode(SS7TCAP::TCAPType tcapType, u_int16_t code);
/** /**
* Obtain TCAP specific error value from abstract TCAP error * Obtain TCAP specific error value from abstract TCAP error
* @param tcapType Type of TCAP for which the error is searched * @param tcapType Type of TCAP for which the error is searched
@ -10824,10 +10877,12 @@ public:
* @return The error value as defined by the TCAP protocol * @return The error value as defined by the TCAP protocol
*/ */
static u_int16_t codeFromError(SS7TCAP::TCAPType tcapType, int err); static u_int16_t codeFromError(SS7TCAP::TCAPType tcapType, int err);
/** /**
* Dictionary for error types * Dictionary for error types
*/ */
static const TokenDict s_errorTypes[]; static const TokenDict s_errorTypes[];
private: private:
SS7TCAP::TCAPType m_tcapType; SS7TCAP::TCAPType m_tcapType;
ErrorType m_error; ErrorType m_error;
@ -10846,11 +10901,13 @@ public:
PackageReceived = 2, PackageReceived = 2,
Active = 3, Active = 3,
}; };
enum TransactionTransmit { enum TransactionTransmit {
NoTransmit = 0, NoTransmit = 0,
PendingTransmit = 256, PendingTransmit = 256,
Transmitted = 521, Transmitted = 521,
}; };
/** /**
* Constructor * Constructor
* @param tcap TCAP holding this transaction * @param tcap TCAP holding this transaction
@ -10862,10 +10919,12 @@ public:
*/ */
SS7TCAPTransaction(SS7TCAP* tcap, SS7TCAP::TCAPUserTransActions type, const String& transactID, NamedList& params, SS7TCAPTransaction(SS7TCAP* tcap, SS7TCAP::TCAPUserTransActions type, const String& transactID, NamedList& params,
u_int64_t timeout, bool initLocal = true); u_int64_t timeout, bool initLocal = true);
/** /**
* Destructor * Destructor
*/ */
~SS7TCAPTransaction(); ~SS7TCAPTransaction();
/** /**
* Process transaction data and fill the NamedList with the decoded data * Process transaction data and fill the NamedList with the decoded data
* @param params NamedList to fill with decoded data * @param params NamedList to fill with decoded data
@ -10873,6 +10932,7 @@ public:
* @return A TCAP error encountered whilst decoding * @return A TCAP error encountered whilst decoding
*/ */
virtual SS7TCAPError handleData(NamedList& params, DataBlock& data) = 0; virtual SS7TCAPError handleData(NamedList& params, DataBlock& data) = 0;
/** /**
* An update request for this transaction * An update request for this transaction
* @param type The type of transaction to which this transaction should be updated * @param type The type of transaction to which this transaction should be updated
@ -10881,6 +10941,7 @@ public:
* @return A TCAP Error * @return A TCAP Error
*/ */
virtual SS7TCAPError update(SS7TCAP::TCAPUserTransActions type, NamedList& params, bool updateByUser = true) = 0; virtual SS7TCAPError update(SS7TCAP::TCAPUserTransActions type, NamedList& params, bool updateByUser = true) = 0;
/** /**
* Handle TCAP relevant dialog data * Handle TCAP relevant dialog data
* @param params NamedList containing (if present) dialog information * @param params NamedList containing (if present) dialog information
@ -10888,6 +10949,7 @@ public:
* @return A report error * @return A report error
*/ */
virtual SS7TCAPError handleDialogPortion(NamedList& params,bool byUser = true) = 0; virtual SS7TCAPError handleDialogPortion(NamedList& params,bool byUser = true) = 0;
/** /**
* Build a Reject component in answer to an encoutered error during decoding of the component portion * Build a Reject component in answer to an encoutered error during decoding of the component portion
* @param error The encountered error * @param error The encountered error
@ -10896,6 +10958,7 @@ public:
* @return A report error * @return A report error
*/ */
virtual SS7TCAPError buildComponentError(SS7TCAPError& error, NamedList& params, DataBlock& data); virtual SS7TCAPError buildComponentError(SS7TCAPError& error, NamedList& params, DataBlock& data);
/** /**
* Update components * Update components
* @param params NamedList reference containing the update information * @param params NamedList reference containing the update information
@ -10903,39 +10966,46 @@ public:
* @return A report error * @return A report error
*/ */
virtual SS7TCAPError handleComponents(NamedList& params, bool updateByUser = true); virtual SS7TCAPError handleComponents(NamedList& params, bool updateByUser = true);
/** /**
* Request encoding for the components of this transaction * Request encoding for the components of this transaction
* @param params Components parameters to encode * @param params Components parameters to encode
* @param data DataBlock reference in which to insert the encoded components * @param data DataBlock reference in which to insert the encoded components
*/ */
virtual void requestComponents(NamedList& params, DataBlock& data); virtual void requestComponents(NamedList& params, DataBlock& data);
/** /**
* Fill the NamedList with transaction portion parameters * Fill the NamedList with transaction portion parameters
* @param params NamedList reference to fill with transaction portion parameters * @param params NamedList reference to fill with transaction portion parameters
*/ */
virtual void transactionData(NamedList& params); virtual void transactionData(NamedList& params);
/** /**
* Request content for this transaction * Request content for this transaction
* @param params List of parameters of this tranaction * @param params List of parameters of this tranaction
* @param data Data block to fill with encoded content * @param data Data block to fill with encoded content
*/ */
virtual void requestContent(NamedList& params, DataBlock& data) = 0; virtual void requestContent(NamedList& params, DataBlock& data) = 0;
/** /**
* Check components for timeouts * Check components for timeouts
*/ */
virtual void checkComponents(); virtual void checkComponents();
/** /**
* Set the current type of transaction primitive * Set the current type of transaction primitive
* @param type The transaction primitive to be set * @param type The transaction primitive to be set
*/ */
inline void setTransactionType(SS7TCAP::TCAPUserTransActions type) inline void setTransactionType(SS7TCAP::TCAPUserTransActions type)
{ Lock l(this); m_type = type; } { Lock l(this); m_type = type; }
/** /**
* Retrieve the current type of primitive that is set for this transaction * Retrieve the current type of primitive that is set for this transaction
* @return The transaction primitive type * @return The transaction primitive type
*/ */
inline SS7TCAP::TCAPUserTransActions transactionType() inline SS7TCAP::TCAPUserTransActions transactionType()
{ return m_type; } { return m_type; }
/** /**
* Set the state of this transaction, trigger a transmission pending state * Set the state of this transaction, trigger a transmission pending state
* @param state The state to set for the transaction * @param state The state to set for the transaction
@ -10948,87 +11018,102 @@ public:
if (state != Idle) if (state != Idle)
m_transmit = PendingTransmit; m_transmit = PendingTransmit;
} }
/** /**
* Retrieve the state of this transaction * Retrieve the state of this transaction
* @return The state of this transaction * @return The state of this transaction
*/ */
inline TransactionState transactionState() inline TransactionState transactionState()
{ return m_state; } { return m_state; }
/** /**
* Set the transmission state for this transaction * Set the transmission state for this transaction
* @param state The transmission state to be set * @param state The transmission state to be set
*/ */
void setTransmitState(TransactionTransmit state); void setTransmitState(TransactionTransmit state);
/** /**
* The transmission state for this transaction * The transmission state for this transaction
* @return The current transmission state * @return The current transmission state
*/ */
inline TransactionTransmit transmitState() inline TransactionTransmit transmitState()
{ return m_transmit; } { return m_transmit; }
/** /**
* The TCAP to which this transaction belongs * The TCAP to which this transaction belongs
* @return A pointer to the TCAP component * @return A pointer to the TCAP component
*/ */
inline SS7TCAP* tcap() inline SS7TCAP* tcap()
{ return m_tcap; } { return m_tcap; }
/** /**
* Get the ID of the transaction so it can be used for list searches * Get the ID of the transaction so it can be used for list searches
* @return A reference to the ID * @return A reference to the ID
*/ */
const String& toString() const const String& toString() const
{ return m_localID; } { return m_localID; }
/** /**
* Set the TCAP username to which this transaction belongs * Set the TCAP username to which this transaction belongs
* @param name The name of the user to set * @param name The name of the user to set
*/ */
inline void setUserName(const String& name) inline void setUserName(const String& name)
{ m_userName = name; } { m_userName = name; }
/** /**
* Return the name of the TCAP user to which this transaction belongs * Return the name of the TCAP user to which this transaction belongs
* @return The name of the user * @return The name of the user
*/ */
const String& userName() const String& userName()
{ return m_userName; } { return m_userName; }
/** /**
* Check if a basic end was set for this transaction * Check if a basic end was set for this transaction
* @return True if basic end was specified by the user, false if prearranged end was specified * @return True if basic end was specified by the user, false if prearranged end was specified
*/ */
inline bool basicEnd() inline bool basicEnd()
{ return m_basicEnd; } { return m_basicEnd; }
/** /**
* Add SCCP Addressing information * Add SCCP Addressing information
* @param fillParams NamedList to fill with addressing information * @param fillParams NamedList to fill with addressing information
* @param local True if the information is for the user, otherwise * @param local True if the information is for the user, otherwise
*/ */
void addSCCPAddressing(NamedList& fillParams, bool local); void addSCCPAddressing(NamedList& fillParams, bool local);
/** /**
* Check if the flag to end this transaction immediately was set * Check if the flag to end this transaction immediately was set
* @return True if the end flag was set, false otherwise * @return True if the end flag was set, false otherwise
*/ */
inline bool endNow() inline bool endNow()
{ return m_endNow; } { return m_endNow; }
/** /**
* Set the flag to end this transaction immediately * Set the flag to end this transaction immediately
* @param endNow Boolean value to set to the end flag * @param endNow Boolean value to set to the end flag
*/ */
inline void endNow(bool endNow) inline void endNow(bool endNow)
{ m_endNow = endNow; } { m_endNow = endNow; }
/** /**
* Check if the transaction has timed out * Check if the transaction has timed out
* @return True if the transaction timed out, false otherwise * @return True if the transaction timed out, false otherwise
*/ */
inline bool timedOut() inline bool timedOut()
{ return m_timeout.timeout(); } { return m_timeout.timeout(); }
/** /**
* Find a component with given id * Find a component with given id
* @param id Id of component to find * @param id Id of component to find
* @return The component with given id or null * @return The component with given id or null
*/ */
SS7TCAPComponent* findComponent(const String& id); SS7TCAPComponent* findComponent(const String& id);
/** /**
* Update the state of this transaction to end the transaction * Update the state of this transaction to end the transaction
*/ */
virtual void updateToEnd(); virtual void updateToEnd();
/** /**
* Update transaction state * Update transaction state
* @param byUser True if update is requested by user, false if by remote * @param byUser True if update is requested by user, false if by remote
@ -11036,9 +11121,30 @@ public:
inline void updateState(bool byUser = true) inline void updateState(bool byUser = true)
{ } { }
/**
* @param params NamedList reference to fill with the decoded dialog information
* @param data DataBlock reference from which to decode the dialog information
* @return A TCAP error encountered whilst decoding
*/
virtual SS7TCAPError decodeDialogPortion(NamedList& params, DataBlock& data) = 0; virtual SS7TCAPError decodeDialogPortion(NamedList& params, DataBlock& data) = 0;
/**
* @param params NamedList reference from which to take the dialog information to encode
* @param data DataBlock reference into which to put the encoded dialog information
*/
virtual void encodeDialogPortion(NamedList& params, DataBlock& data) = 0; virtual void encodeDialogPortion(NamedList& params, DataBlock& data) = 0;
/**
* @param params NamedList reference to fill with the decoded component information
* @param data DataBlock reference from which to decode the component information
* @return A TCAP error encountered whilst decoding
*/
virtual SS7TCAPError decodeComponents(NamedList& params, DataBlock& data) = 0; virtual SS7TCAPError decodeComponents(NamedList& params, DataBlock& data) = 0;
/**
* @param params NamedList reference from which to take the component information to encode
* @param data DataBlock reference into which to put the encoded component information
*/
virtual void encodeComponents(NamedList& params, DataBlock& data) = 0; virtual void encodeComponents(NamedList& params, DataBlock& data) = 0;
protected: protected:
@ -11077,6 +11183,7 @@ public:
OperationSent, OperationSent,
WaitForReject, WaitForReject,
}; };
/** /**
* Constructor * Constructor
* @param type TCAP type for which to build this component * @param type TCAP type for which to build this component
@ -11085,22 +11192,26 @@ public:
* @param index Index in the list of parameters * @param index Index in the list of parameters
*/ */
SS7TCAPComponent(SS7TCAP::TCAPType type, SS7TCAPTransaction* trans, NamedList& params, unsigned int index); SS7TCAPComponent(SS7TCAP::TCAPType type, SS7TCAPTransaction* trans, NamedList& params, unsigned int index);
/** /**
* Destructor * Destructor
*/ */
virtual ~SS7TCAPComponent(); virtual ~SS7TCAPComponent();
/** /**
* Update this component's data * Update this component's data
* @param params Update parameters * @param params Update parameters
* @param index Index of parameters in the list for the update of this component * @param index Index of parameters in the list for the update of this component
*/ */
virtual void update(NamedList& params, unsigned int index); virtual void update(NamedList& params, unsigned int index);
/** /**
* Put the information of the component in a NamedList * Put the information of the component in a NamedList
* @param index Index for build parameter names * @param index Index for build parameter names
* @param fillIn NamedList to fill with this component's information * @param fillIn NamedList to fill with this component's information
*/ */
virtual void fill(unsigned int index, NamedList& fillIn); virtual void fill(unsigned int index, NamedList& fillIn);
/** /**
* Build a TCAP Component from a NamedList * Build a TCAP Component from a NamedList
* @param type TCAP type of component * @param type TCAP type of component
@ -11110,73 +11221,86 @@ public:
* @return A pointer to the built SS7TCAPComponent or nil if not all required parameters are present * @return A pointer to the built SS7TCAPComponent or nil if not all required parameters are present
*/ */
static SS7TCAPComponent* componentFromNamedList(SS7TCAP::TCAPType type, SS7TCAPTransaction* tr, NamedList& params, unsigned int index); static SS7TCAPComponent* componentFromNamedList(SS7TCAP::TCAPType type, SS7TCAPTransaction* tr, NamedList& params, unsigned int index);
/** /**
* Set the transaction to which this component belongs to * Set the transaction to which this component belongs to
* @param transact TCAP transaction * @param transact TCAP transaction
*/ */
void setTransaction(SS7TCAPTransaction* transact); void setTransaction(SS7TCAPTransaction* transact);
/** /**
* Returns the transaction to which this component belongs to. * Returns the transaction to which this component belongs to.
*/ */
SS7TCAPTransaction* transaction(); SS7TCAPTransaction* transaction();
/** /**
* Set the type for this component * Set the type for this component
* @param type The type of the component * @param type The type of the component
*/ */
inline void setType(SS7TCAP::TCAPUserCompActions type) inline void setType(SS7TCAP::TCAPUserCompActions type)
{ m_type = type; } { m_type = type; }
/** /**
* Get the type of the component * Get the type of the component
*/ */
inline SS7TCAP::TCAPUserCompActions type() inline SS7TCAP::TCAPUserCompActions type()
{ return m_type; } { return m_type; }
/** /**
* Set the Invoke ID for this component * Set the Invoke ID for this component
* @param invokeID The invoke ID to assign * @param invokeID The invoke ID to assign
*/ */
virtual void setInvokeID(String invokeID) virtual void setInvokeID(String invokeID)
{ m_id = invokeID; } { m_id = invokeID; }
/** /**
* String representation of this component's Invoke ID * String representation of this component's Invoke ID
* @return String representation of Invoke ID * @return String representation of Invoke ID
*/ */
virtual const String& toString () const virtual const String& toString () const
{ return m_id; } { return m_id; }
/** /**
* String representation of this component's Correlation ID * String representation of this component's Correlation ID
* @return String representation of Correlation ID * @return String representation of Correlation ID
*/ */
virtual const String& correlationID() const virtual const String& correlationID() const
{ return m_corrID; } { return m_corrID; }
/** /**
* Check if the component has timed out * Check if the component has timed out
* @return True if the component timed out, false otherwise * @return True if the component timed out, false otherwise
*/ */
inline bool timedOut() inline bool timedOut()
{ return m_opTimer.timeout(); } { return m_opTimer.timeout(); }
/** /**
* Set component state * Set component state
* @param state The state to be set * @param state The state to be set
*/ */
void setState(TCAPComponentState state); void setState(TCAPComponentState state);
/** /**
* Obtain the component state * Obtain the component state
* @return The component state * @return The component state
*/ */
inline TCAPComponentState state() inline TCAPComponentState state()
{ return m_state; } { return m_state; }
/** /**
* Reset invocation timer on user request * Reset invocation timer on user request
* @param params List of parameters * @param params List of parameters
* @param index Index of this component's parameters in the list * @param index Index of this component's parameters in the list
*/ */
void resetTimer(NamedList& params, unsigned int index); void resetTimer(NamedList& params, unsigned int index);
/** /**
* Retrieve operation class for this component * Retrieve operation class for this component
* @return The class of the operation * @return The class of the operation
*/ */
SS7TCAP::TCAPComponentOperationClass operationClass() SS7TCAP::TCAPComponentOperationClass operationClass()
{ return m_opClass; } { return m_opClass; }
/** /**
* Dictionary for component states * Dictionary for component states
*/ */
@ -11207,6 +11331,7 @@ public:
UserAbortPTag = 0xd8 , // Primitive UserAbortPTag = 0xd8 , // Primitive
UserAbortCTag = 0xf8, // Constructor UserAbortCTag = 0xf8, // Constructor
}; };
enum TCAPDialogTags { enum TCAPDialogTags {
DialogPortionTag = 0xf9, DialogPortionTag = 0xf9,
ProtocolVersionTag = 0xda, ProtocolVersionTag = 0xda,
@ -11217,6 +11342,7 @@ public:
OIDSecurityContextTag = 0x81, OIDSecurityContextTag = 0x81,
ConfidentialityTag = 0xa2, ConfidentialityTag = 0xa2,
}; };
enum UserInfoTags { enum UserInfoTags {
DirectReferenceTag = 0x06, DirectReferenceTag = 0x06,
DataDescriptorTag = 0x07, DataDescriptorTag = 0x07,
@ -11226,10 +11352,12 @@ public:
OctetAlignEncTag = 0x81, OctetAlignEncTag = 0x81,
ArbitraryEncTag = 0x82, ArbitraryEncTag = 0x82,
}; };
enum ConfidentialityTags { enum ConfidentialityTags {
IntConfidentialContextTag = 0x80, IntConfidentialContextTag = 0x80,
OIDConfidentialContextTag = 0x81, OIDConfidentialContextTag = 0x81,
}; };
enum TCAPComponentTags { enum TCAPComponentTags {
ComponentPortionTag = 0xe8, ComponentPortionTag = 0xe8,
ComponentsIDsTag = 0xcf, ComponentsIDsTag = 0xcf,
@ -11241,15 +11369,18 @@ public:
ParameterSetTag = 0xf2, ParameterSetTag = 0xf2,
ParameterSeqTag = 0x30, ParameterSeqTag = 0x30,
}; };
/** /**
* Constructor * Constructor
* @param params NamedList containing parameters for building TCAP * @param params NamedList containing parameters for building TCAP
*/ */
SS7TCAPANSI(const NamedList& params); SS7TCAPANSI(const NamedList& params);
/** /**
* Destructor * Destructor
*/ */
~SS7TCAPANSI(); ~SS7TCAPANSI();
/** /**
* Build a transaction * Build a transaction
* @param type Type with which to build the transactions * @param type Type with which to build the transactions
@ -11260,6 +11391,7 @@ public:
*/ */
virtual SS7TCAPTransaction* buildTransaction(SS7TCAP::TCAPUserTransActions type, const String& transactID, NamedList& params, virtual SS7TCAPTransaction* buildTransaction(SS7TCAP::TCAPUserTransActions type, const String& transactID, NamedList& params,
bool initLocal = true); bool initLocal = true);
private: private:
SS7TCAPError decodeTransactionPart(NamedList& params, DataBlock& data); SS7TCAPError decodeTransactionPart(NamedList& params, DataBlock& data);
void encodeTransactionPart(NamedList& params, DataBlock& data); void encodeTransactionPart(NamedList& params, DataBlock& data);
@ -11282,6 +11414,7 @@ public:
InvokeNotLast = 0xed, InvokeNotLast = 0xed,
ReturnResultNotLast = 0xee, ReturnResultNotLast = 0xee,
}; };
enum ANSITransactionType { enum ANSITransactionType {
Unknown = 0x0, Unknown = 0x0,
Unidirectional = 0xe1, Unidirectional = 0xe1,
@ -11292,6 +11425,7 @@ public:
ConversationWithoutPermission = 0xe6, ConversationWithoutPermission = 0xe6,
Abort = 0xf6, Abort = 0xf6,
}; };
/** /**
* Constructor * Constructor
* @param tcap TCAP holding this transaction * @param tcap TCAP holding this transaction
@ -11303,10 +11437,12 @@ public:
*/ */
SS7TCAPTransactionANSI(SS7TCAP* tcap, SS7TCAP::TCAPUserTransActions type, const String& transactID, NamedList& params, SS7TCAPTransactionANSI(SS7TCAP* tcap, SS7TCAP::TCAPUserTransActions type, const String& transactID, NamedList& params,
u_int64_t timeout, bool initLocal = true); u_int64_t timeout, bool initLocal = true);
/** /**
* Destructor * Destructor
*/ */
~SS7TCAPTransactionANSI(); ~SS7TCAPTransactionANSI();
/** /**
* Process transaction data and fill the NamedList with the decoded data * Process transaction data and fill the NamedList with the decoded data
* @param params NamedList to fill with decoded data * @param params NamedList to fill with decoded data
@ -11314,6 +11450,7 @@ public:
* @return A TCAP error encountered whilst decoding * @return A TCAP error encountered whilst decoding
*/ */
virtual SS7TCAPError handleData(NamedList& params, DataBlock& data); virtual SS7TCAPError handleData(NamedList& params, DataBlock& data);
/** /**
* An update request for this transaction * An update request for this transaction
* @param type The type of transaction to which this transaction should be updated * @param type The type of transaction to which this transaction should be updated
@ -11322,6 +11459,7 @@ public:
* @return A TCAP Error * @return A TCAP Error
*/ */
virtual SS7TCAPError update(SS7TCAP::TCAPUserTransActions type, NamedList& params, bool updateByUser = true); virtual SS7TCAPError update(SS7TCAP::TCAPUserTransActions type, NamedList& params, bool updateByUser = true);
/** /**
* Handle TCAP relevant dialog data * Handle TCAP relevant dialog data
* @param params NamedList containing (if present) dialog information * @param params NamedList containing (if present) dialog information
@ -11329,6 +11467,7 @@ public:
* @return A report error * @return A report error
*/ */
virtual SS7TCAPError handleDialogPortion(NamedList& params, bool byUser = true); virtual SS7TCAPError handleDialogPortion(NamedList& params, bool byUser = true);
/** /**
* Encode P-Abort information * Encode P-Abort information
* @param tr The transaction on which the abort was signalled * @param tr The transaction on which the abort was signalled
@ -11336,6 +11475,7 @@ public:
* @param data DataBlock reference in which to insert the encoded P-Abort information * @param data DataBlock reference in which to insert the encoded P-Abort information
*/ */
static void encodePAbort(SS7TCAPTransaction* tr, NamedList& params, DataBlock& data); static void encodePAbort(SS7TCAPTransaction* tr, NamedList& params, DataBlock& data);
/** /**
* Decode P-Abort TCAP message portion * Decode P-Abort TCAP message portion
* @param tr The transaction on which the abort was signalled * @param tr The transaction on which the abort was signalled
@ -11343,21 +11483,25 @@ public:
* @param data DataBlock reference from which to decode P-Abort information * @param data DataBlock reference from which to decode P-Abort information
*/ */
static SS7TCAPError decodePAbort(SS7TCAPTransaction* tr, NamedList& params, DataBlock& data); static SS7TCAPError decodePAbort(SS7TCAPTransaction* tr, NamedList& params, DataBlock& data);
/** /**
* Update the state of this transaction to end the transaction * Update the state of this transaction to end the transaction
*/ */
virtual void updateToEnd(); virtual void updateToEnd();
/** /**
* Update transaction state * Update transaction state
* @param byUser True if update is requested by user, false if by remote * @param byUser True if update is requested by user, false if by remote
*/ */
virtual void updateState(bool byUser); virtual void updateState(bool byUser);
/** /**
* Request content for this transaction * Request content for this transaction
* @param params List of parameters of this tranaction * @param params List of parameters of this tranaction
* @param data Data block to fill with encoded content * @param data Data block to fill with encoded content
*/ */
virtual void requestContent(NamedList& params, DataBlock& data); virtual void requestContent(NamedList& params, DataBlock& data);
/** /**
* Dictionary keeping string versions of transaction types * Dictionary keeping string versions of transaction types
*/ */