#include <scim_socket_transaction.h>
Public Member Functions | |
SocketTransaction (size_t bufsize=512) | |
Constructor. | |
~SocketTransaction () | |
Destructor. | |
bool | valid () const |
Check if the transaction is valid. | |
bool | write_to_socket (const Socket &socket, uint32 signature=0) const |
Write the transaction to a socket. | |
bool | read_from_socket (const Socket &socket, int timeout=-1) |
Read a transaction from a socket. | |
void | put_command (int cmd) |
Store a command into this transaction. | |
void | put_data (uint32 val) |
Store a uint32 value into this transaction. | |
void | put_data (const String &str) |
Store a String object into this transaction. | |
void | put_data (const WideString &str) |
Store a WideString object into this transaction. | |
void | put_data (const KeyEvent &key) |
Store a KeyEvent object into this transaction. | |
void | put_data (const AttributeList &attrs) |
Store an AttributeList object into this transaction. | |
void | put_data (const Property &property) |
Store a Property object into this transaction. | |
void | put_data (const PropertyList &properties) |
Store a PropertyList object into this transaction. | |
void | put_data (const LookupTable &table) |
Store a LookupTable object into this transaction. | |
void | put_data (const std::vector< uint32 > &vec) |
Store a std::vector<uint32> object into this transaction. | |
void | put_data (const std::vector< String > &vec) |
Store a std::vector<String> object into this transaction. | |
void | put_data (const std::vector< WideString > &vec) |
Store a std::vector<WideString> object into this transaction. | |
void | put_data (const char *raw, size_t bufsize) |
Store a raw buffer into this transaction. | |
SocketTransactionDataType | get_data_type () const |
Get the type of the data at current read position. | |
bool | get_command (int &cmd) |
Get a command from current read position. | |
bool | get_data (uint32 &val) |
Get an uint32 value from current read position. | |
bool | get_data (String &str) |
Get a String from current read position. | |
bool | get_data (WideString &str) |
Get a WideString from current read position. | |
bool | get_data (KeyEvent &key) |
Get a KeyEvent from current read position. | |
bool | get_data (AttributeList &attrs) |
Get an AttributeList from current read position. | |
bool | get_data (Property &property) |
Get a Property from current read position. | |
bool | get_data (PropertyList &properties) |
Get a PropertyList from current read position. | |
bool | get_data (CommonLookupTable &table) |
Get a CommonLookupTable from current read position. | |
bool | get_data (std::vector< uint32 > &vec) |
Get a std::vector<uint32> from current read position. | |
bool | get_data (std::vector< String > &vec) |
Get a std::vector<String> from current read position. | |
bool | get_data (std::vector< WideString > &vec) |
Get a std::vector<WideString> from current read position. | |
bool | get_data (char **raw, size_t &bufsize) |
Get a raw buffer from current read position. | |
bool | skip_data () |
Skip one data from current read position. | |
void | rewind_read_pos () |
Rewind the current read position, then the data can be read again. | |
void | clear () |
Clear the transaction, all data in this transaction will be freed. |
Definition at line 162 of file scim_socket_transaction.h.
|
Constructor.
|
|
Destructor.
|
|
Check if the transaction is valid.
|
|
Write the transaction to a socket.
|
|
Read a transaction from a socket.
|
|
Store a command into this transaction.
|
|
Store a uint32 value into this transaction.
|
|
Store a String object into this transaction.
|
|
Store a WideString object into this transaction.
|
|
Store a KeyEvent object into this transaction.
|
|
Store an AttributeList object into this transaction.
|
|
Store a Property object into this transaction.
|
|
Store a PropertyList object into this transaction.
|
|
Store a LookupTable object into this transaction.
|
|
Store a std::vector<uint32> object into this transaction.
|
|
Store a std::vector<String> object into this transaction.
|
|
Store a std::vector<WideString> object into this transaction.
|
|
Store a raw buffer into this transaction.
|
|
Get the type of the data at current read position.
|
|
Get a command from current read position.
|
|
Get an uint32 value from current read position.
|
|
Get a String from current read position.
|
|
Get a WideString from current read position.
|
|
Get a KeyEvent from current read position.
|
|
Get an AttributeList from current read position.
|
|
Get a Property from current read position.
|
|
Get a PropertyList from current read position.
|
|
Get a CommonLookupTable from current read position.
|
|
Get a std::vector<uint32> from current read position.
|
|
Get a std::vector<String> from current read position.
|
|
Get a std::vector<WideString> from current read position.
|
|
Get a raw buffer from current read position. if raw == NULL then return the bufsize and skip this data. *raw should be deleted afterwards (do not use free!). |
|
Skip one data from current read position.
|
|
Rewind the current read position, then the data can be read again.
|
|
Clear the transaction, all data in this transaction will be freed.
|