You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
2.0 KiB
Groff
70 lines
2.0 KiB
Groff
.TH SXHUB_SET_CHANNELCALL 3 "20 July 2015" "SXMP" "SXMP Library Manual"
|
|
.SH NAME
|
|
sxhub_set_channelcall \- Set callback for the connection links based on the connections set, called during connection link initiation on the client side.
|
|
.br
|
|
.SH SYNOPSIS
|
|
.B #include <sxmp/sxmp.h>
|
|
.sp
|
|
#define sxhub_set_channelcall(c, f)
|
|
|
|
.br
|
|
.sp
|
|
.SH DESCRIPTION
|
|
This macro should be used if you want to setup callback function fired while connection link initiating, it might be useful to sync your client ability to support masters protocol and/or correctly initialize your application.
|
|
.br
|
|
This macro will set on
|
|
.B c
|
|
connections link set callback
|
|
.B f
|
|
which is a function pointer of the type:
|
|
.br
|
|
.sp
|
|
.B typedef int (*channelcall_t)(sxlink_t *co, int tid, char *desc);
|
|
.br
|
|
.sp
|
|
It will pass a pointer to the connection link initiating now. Link isn't set fully at this moment and doesn't pass any messages and don't works with channel's operations. To pass initiation to the next stage this function should return
|
|
.B SXE_SUCCESS.
|
|
In fail case other code error should be returned. It's a good practice to return
|
|
.B SXE_IGNORED
|
|
if your application doesn't support protocol channels or outdated.
|
|
.br
|
|
SXMP will push channel type id in
|
|
.B tid
|
|
and text description in
|
|
.B desc
|
|
.br
|
|
This call will be invoked on each RPC channel.
|
|
.SH RETURN VALUE
|
|
None.
|
|
.SH ERRORS
|
|
None.
|
|
.SH BUGS
|
|
None known yet.
|
|
.SH EXAMPLE
|
|
This example shows the code prototype of such function:
|
|
.RS
|
|
.nf
|
|
.if t .ft CW
|
|
int rpcchanack(sxlink_t *co, int tid, char *desc)
|
|
{
|
|
fprintf(stdout, "Master side supported RPC channel type: %d '%s'\n", tid, desc);
|
|
|
|
return SXE_SUCCESS; /* all is fine */
|
|
}
|
|
.SH APPLICATION USAGE
|
|
This function should be used on the client service, it will not be called on the master side anyway, since master provide RPC channels.
|
|
.SH RATIONALE
|
|
None.
|
|
.SH SEE ALSO
|
|
.BI sxhub_set_ondestroy(3)
|
|
,
|
|
.BI sxlink_getpriv(3)
|
|
,
|
|
.BI sxlink_setpriv(3)
|
|
.SH COPYRIGHT
|
|
This software licensed under GNU LGPL v3. See COPYING for further details.
|
|
.br
|
|
(c) Askele Group 2013-2015 <http://askele.com>
|
|
.SH AUTHOR
|
|
Alexander Vdolainen (vdo@askele.com)
|