Trading API for C
7.0.0.309536
|
Data Structures | |
struct | ctl_channel_listener |
Listener interface that should be registered if you wish to receive notification of trade creation and closing. More... | |
Typedefs | |
typedef struct ctl_channel_s | ctl_channel |
Opaque handle representing a trade channel. More... | |
Functions | |
void | ctl_channel_close (ctl_provider *provider, ctl_channel *channel) |
Forcibly close the trade channel. More... | |
const char * | ctl_channel_get_subject (ctl_provider *provider, ctl_channel *channel) |
Get the subject of the TradeChannel. More... | |
void * | ctl_channel_get_user_pointer (ctl_provider *provider, ctl_channel *channel) |
Gets the user pointer on the ctl_trade object. More... | |
const char * | ctl_channel_get_username (ctl_provider *provider, ctl_channel *channel) |
Get the name of the user that opened the specified channel. More... | |
void | ctl_channel_set_listener (ctl_provider *provider, ctl_channel *channel, ctl_channel_listener *listener, void *context) |
Set the listener on the trade channel. More... | |
void | ctl_channel_set_user_pointer (ctl_provider *provider, ctl_channel *channel, void *ptr) |
Set a user pointer on the ctl_channel object. More... | |
typedef struct ctl_channel_s ctl_channel |
Opaque handle representing a trade channel.
void ctl_channel_close | ( | ctl_provider * | provider, |
ctl_channel * | channel | ||
) |
Forcibly close the trade channel.
provider | - The trading provider |
channel | - The trade channel to close |
const char* ctl_channel_get_subject | ( | ctl_provider * | provider, |
ctl_channel * | channel | ||
) |
Get the subject of the TradeChannel.
provider | - The trading provider |
channel | - The trade channel to query |
void* ctl_channel_get_user_pointer | ( | ctl_provider * | provider, |
ctl_channel * | channel | ||
) |
Gets the user pointer on the ctl_trade object.
provider | - The trading provider |
channel | - The trade channel |
const char* ctl_channel_get_username | ( | ctl_provider * | provider, |
ctl_channel * | channel | ||
) |
Get the name of the user that opened the specified channel.
provider | - The trading provider |
channel | - The trade channel to query |
void ctl_channel_set_listener | ( | ctl_provider * | provider, |
ctl_channel * | channel, | ||
ctl_channel_listener * | listener, | ||
void * | context | ||
) |
Set the listener on the trade channel.
provider | - The trading provider |
channel | - The trade channel |
listener | - The listener to call |
context | - A context pointer for the listener |
The registered listener will receive notification of the creation of trades in addition to trades being closed. A trade will be closed when the user logs out of the application.
void ctl_channel_set_user_pointer | ( | ctl_provider * | provider, |
ctl_channel * | channel, | ||
void * | ptr | ||
) |
Set a user pointer on the ctl_channel object.
provider | - The trading provider |
channel | - The trade channel |
ptr | - the pointer to store |
This function can be called to stash a user pointer against a channel object. This is of use if this C API is being wrapped to present a C++ or Objective-C API to your application.