22typedef struct _vrpn_TEXTCB {
23 struct timeval msg_time;
52 if (d_connection) d_connection->mainloop();
56 int send_message(
const char *msg,
58 vrpn_uint32 level = 0,
76 return d_callback_list.register_handler(userdata, handler);
82 return d_callback_list.unregister_handler(userdata, handler);
88 d_connection->mainloop();
void client_mainloop(void)
Handles functions that all clients should provide in their mainloop() (warning of no server,...
void server_mainloop(void)
Handles functions that all servers should provide in their mainloop() (ping/pong, for example) Should...
Class from which all user-level (and other) classes that communicate with vrpn_Connections should der...
virtual int init(void)
Initialize things that the constructor can't. Returns 0 on success, -1 on failure.
Generic connection class not specific to the transport mechanism.
Allows a user to handle text messages directly, in addition to having the.
virtual int register_types(void)
No types to register beyond the text, which is done in BaseClass.
virtual int unregister_message_handler(void *userdata, vrpn_TEXTHANDLER handler)
virtual void mainloop(void)
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
vrpn_Callback_List< vrpn_TEXTCB > d_callback_list
virtual int register_message_handler(void *userdata, vrpn_TEXTHANDLER handler)
Allows a user to send text messages from a device (usually,.
vrpn_Text_Sender(const char *name, vrpn_Connection *c=NULL)
virtual int register_types(void)
No types to register beyond the text, which is done in BaseClass.
void mainloop(void)
Mainloop the connection to send the message.
This structure is what is passed to a vrpn_Connection message callback.
Structure passed back to user-level code from a vrpn_Text_Receiver.
All types of client/server/peer objects in VRPN should be derived from the vrpn_BaseClass type descri...
vrpn_TEXT_SEVERITY
Since the sending of text messages has been pulled into the base class (so that every object can send...
const unsigned vrpn_MAX_TEXT_LEN
void(VRPN_CALLBACK * vrpn_TEXTHANDLER)(void *userdata, const vrpn_TEXTCB info)
Description of the callback function type.
const struct timeval vrpn_TEXT_NOW