InitSelfInfo
Returns
int
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Inits our user structure using the parameters provided by theuser.
To top
ReadOnListeningSocket
Returns
int : VLVC return code
Parameters
vlvc_t * p_vlvc : pointer to the vlvc object
fd_set *fds_r : pointer to the select()set fds
Description
Handles specifically on the listening socket. When select() setsthis fd, that means that someone is connecting to the server.
So, this function is dedicated to accept new clients.
To top
DeleteVlmUserControl
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : user ID
Description
Wrapper for HandleVlmUserControl only designed to make the codeeasier to be read.
Deletes the VLM control of the specified user.
To top
ReadFromClient
Returns
int : VLVC return code
Parameters
vlc_object_t *p_object : pointer to the common object structure
Description
Reads client messages depending on select() set fd.
To top
NetWrite
Returns
int : number of bytes written
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_fd : the fd to whom we want to send data
void *p_content : data to be sent
int i_size : size of the data to be sent
Description
Wrapper for net_Write (sends data on the network)To top
HandleMessageFromClient
Returns
int: VLVC return code
Parameters
vlvc_t * p_vlvc : pointer to the vlvc object
int i_user_id : the concerned user's ID
char c_message_type : the message type received from the client
Description
Does what has to be done with the received command.
To top
ServerNetSendMessageAll
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
vlvc_message_header_t *message_header : message header to send
char *psz_message : message to send
Description
Function called by the server to send a message to all the usersand to display the message in the GUI.
To top
ClientUserAuthorize
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Function called on the client when a user is authorized.
We first have to read the leaving client ID, then stop its VLMcontrols and clean its data. Then inform the GUI.
To top
ClientReceiveWelcomeData
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Called by the client to receive the conference information.
To top
CreateVlmUserControl
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : user ID
Description
Wrapper for HandleVlmUserControl only designed to make the codeeasier to be read.
Creates the VLM control of the specified user.
To top
ServerUserLeave
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_index : ID of the user to delete
Description
Deletes the specified user and informs the GUI.
To top
vlvc_Delete
Comments
As done in other modules, we are supposed to call to vlc_thread_join to cleanour thread. But in our case, as we create many other threads, differentissues occur when we call it.
There is no problem not to call vlc_thread_join as our threads exit properly.
Returns
void
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
frees and releases if needed the vlvc "object"To top
PlayVlmUserControl
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : user ID
Description
Wrapper for HandleVlmUserControl only designed to make the codeeasier to be read.
Plays the VLM control of the specified user.
To top
GenerateMulticastInfo
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Generate a multicast IP address and a port for multicast use.
To top
SetupInputVlmUserControl
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : user ID
char *psz_mrl : main MRL data
Description
Wrapper for HandleVlmUserControl only designed to make the codeeasier to be read.
Sets up the input VLM control of the specified user.
To top
SetupCachingValues
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : user ID
Comment
The caching values are stored in the parameters structure.
if a value is VLVC_IGNORE_VALUE , the user selected "Default", and we do not
change any value.
Description
Setup every caching values.
To top
__vlvc_CheckUp
Returns
int : VLC_TRUE or VLC_FALSE
Parameters
vlc_object_t * p_this : a pointer to the common object structure
Description
Checks if the vlvc module is ok for the startup(cf. ../open.cpp).
To top
vlvc_GetUserDesc
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : the user ID
char *psz_user_desc : the user description
Description
Callback used by the GUI to get the specified user's descriptionTo top
GuiDisplayMessage
Returns
void
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
vlvc_message_header_t *p_message_header : a pointer to the
message header
const char *psz_message : a pointer to the message to display
Description
Wrapper for the GUI callback used to display a chat message.
To top
vlvc_SetCallbackEnableAuthBtn
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
void (*) ( int, const char *, int, void * ): pointer to the
callback function
Description
Called by the GUI to provide a callback used to enable the"Authorize" buttonTo top
vlvc_Start
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Starts the core module in the right mode.
To top
GetUserId
Returns
int : user ID
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
returns the first available user ID, orVLVC_NO_MORE_USERS_ALLOWED if there is no free connection left.
To top
vlvc_SetCallbackUnauthUser
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
void (*) ( int, void * ) : pointer to the callback function
Description
Called by the GUI to provide a callback used to notify it whena user is unauthorizedTo top
ClientNetSendMessage
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
vlvc_message_header_t *message_header : message header to send
char *psz_message : message to send
Description
Function called by the client to send a message to the serverTo top
vlvc_SetCallbackChangeNbUsers
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
void (*) ( int, void * ) : pointer to the callback function
Description
Called by the GUI to provide a callback used to notify it whena user joins or leaves.
To top
DoServer
Returns
int : VLVC return code
Parameters
vlc_object_t *p_object : pointer to the common object structure
Description
Used by the server to wait for connections.
calls select in a loop and read on fd if necessary.
To top
SendLeaveUser
Returns
void
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
char c_user_leave_index : the leaving user ID
Description
Used by the server to inform every client someone has left.
To top
vlvc_SetCallbackEnableUnauthBtn
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
void (*) ( int, const char *, int, void * ): pointer to the
callback function
Description
Called by the GUI to provide a callback used to enable the"Unauthorize" buttonTo top
SendHello
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Function called on the client to send hello to the serverTo top
vlvc_Stop
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Stops the core module.
To top
StopVlmUserControl
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : user ID
Description
Wrapper for HandleVlmUserControl only designed to make the codeeasier to be read.
Stops the VLM control of the specified user.
To top
SetupOverlay
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : user ID
Description
Enables/disables the overlay for the specified client's videowindow.
To top
vlvc_SetCallbackStop
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
void (*) ( void * ) : pointer to the callback function
Description
Called by the GUI to provide a callback used to stop it.
To top
ReceiveMulticastInfo
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Used by the client to receive the multicast info message fromthe server.
To top
ClientUserLeave
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Function called on the client when a user leaves.
We first have to read the leaving client ID, then stop its VLMcontrols and clean its data. Then inform the GUI.
To top
ClientUserJoin
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Function called on the client when a new user joins.
First, we get the new user information, then, depending on theconference mode, we have to add ourself to the conference, orread other clients' stream, then inform the GUI of this new user.
To top
ClientReceiveMessage
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Function used by the client to receive a message.
To top
ServerTryMulticast
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_index : the user id to make the test with
Description
The server will try to send a multicast message on thegenerated multicast IP.
To top
ServerSelfJoin
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Function called on the server to add himself to the conferenceTo top
SetupVideoWindowTitle
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : user ID
Description
Used to set the window title for the new video window.
To top
ReadOnSetClientFD
Returns
int : VLVC return code
Parameters
vlvc_t * p_vlvc : pointer to the vlvc object
fd_set *fds_r : pointer to the select()set fds
Description
Loops on all the clients, and handle the incoming message ifhis fd has been set by select().
To top
NetSendMessage
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
vlvc_message_header_t *message_header : message header to send
char *psz_message : message to send
int i_fd : recipient fd
Description
Function called by both the server and the client to senda message throught the specified fdTo top
AddOutputDestination
Returns
int : number of users added
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_src : the user from which we create the
outputs
char *psz_output_mrl : output buffer to be filled
Description
Creates the output MRL for a given user.
To top
SetupOptionVlmUserControl
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : user ID
char *psz_mrl : main MRL data
Description
Wrapper for HandleVlmUserControl only designed to make the codeeasier to be read.
Sets up the options of the specified user VLM control.
To top
SendMulticastInfo
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_index : the user id to send multicast info to
Description
Send the multicast IP address to the specified user.
To top
HandleRaiseHand
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_client_id : client id who sent the message
Description
Function called when a user sends a "Raise hand" requestTo top
vlvc_SetCallbackAuthUser
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
void (*) ( int, void * ) : pointer to the callback function
Description
Called by the GUI to provide a callback used to notify it whena user is authorizedTo top
SelfJoin
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
char *psz_vlm_output_command : VLM command used for the
configuration
Description
Used to add oneself to the conference.
To top
SendNotWelcome
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_index : the client id to send not welcome to
char *psz_error_description : not welcome message
Description
Function called to send a not welcome message to the user.
To top
AddToTemporaryUsers
Returns
void
Parameters
vlvc_t *p_vlvc : pointer to the vlvc object
int i_fd : fd to add in the temporary users list
Description
Adds the given fd to the temporary users listTo top
ClientMode
Returns
int : VLC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Used on the client to connect to the server. Once connectedsuccessfully, the server messages processing loop thread iscreated.
To top
ReceiveMulticastReply
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_index : the user id to read from
Description
The server receives the reply of the client from the multicasttest.
To top
ClientSelfJoin
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Called on the client when the server informs this client himselfhas joined. In this case, the client has to play its webcam onthe display and send it to the server.
To top
SetCacheValue
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : user ID
char *psz_cache_name : VLM option used to change the value
int i_cache_value : the value to set
Description
Setup the given caching value.
To top
NotifyUserJoin
Returns
void
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
char c_new_user_index : the new user ID
Description
Notify clients when a new user has joinedTo top
GuiAuthUser
Returns
void
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : the userid to whom we want to send data
Description
Wrapper for the GUI callback used to notify a change of theuser authTo top
SendCodecsData
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_index : the client id to send the codecs data to
Description
Function called to send the codecs data when the server forces itTo top
ClientPlayUser
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_index : user to play
Description
Function called on the client when a new user joins to setupVLM controls.
To top
ServerNetRead
Returns
int : number of bytes written
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_fd : a file descriptor to read data
void *p_content : data to be sent
int i_size : size of the data to be sent
Description
used by the server to send data safelyTo top
vlvc_SetCallbackCoreModuleMessage
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
void (*) ( char *, int, void * ): pointer to the callback
function
Description
Called by the GUI to provide a callback used to display agraphical message for the user (error, information...)To top
HandleVlmUserControl
Comments
Called with a sprintf template, this function just have to add the user idand some additional information if the psz_mrl is not NULL.
If psz_mrl is not NULL, then the psz_vlm_command_type has a ending %s thatparmits us to add psz_mrl.
Refer to the callers and the macros they use for a better understanding.
We have a timing problem under Windows, which obliged us to add a msleep.
This is a bad solution, but the best we found.
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : user ID
char *psz_vlm_command_type : Used as a basis to create the
VLM command.
char *psz_mrl : additional command parameters to complete
the VLM command.
Description
Generic function that executes the provided VLM command.
To top
ServerNetSendMessage
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
vlvc_message_header_t *message_header : message header to send
char *psz_message : message to send
int i_user_index : recipient user index
Description
Function called by the server to sends a message to the specifieduserTo top
vlvc_SetCallChatMessage
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
void (*) ( int, const char *, int, void * ): pointer to the
callback function
Description
Called by the GUI to provide a callback used to notify of a newchat message.
To top
GuiMessageBox
Returns
void
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
char *psz_message : a pointer to the message to display
int i_critical : the critical level of the message
Description
Wrapper for the GUI callback used to display a message box.
To top
vlvc_Init
Comments
The paraneters structure is allocated and freed in the access module.
So the given pointer does not have to be copied or anything else.
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
vlvc_param_t *p_parameters : pointer to the VLVC parameters
structure
Description
Initializes the vlvc object.
To top
SetupOutputVlmUserControl
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : user ID
char *psz_mrl : main MRL data
Description
Wrapper for HandleVlmUserControl only designed to make the codeeasier to be read.
Sets up the output VLM control of the specified user.
To top
HandleMessage
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_client_id : client id who sent the message
Description
Function called when a user sends a messageTo top
HandlePassword
Parameters
vlvc_t *p_vlvc : pointer to the vlvc object
int i_user_id : the concerned user's ID
char c_message_type : the message type received from the client
Description
Checks if the client's password matches with the passwordset on server.
To top
NetRead
Returns
int : number of bytes read
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_fd : the file descriptor on which data is to be
read
void *p_content : buffer to store read data
int i_size : size of the data to be read
Description
Wrapper for net_Read (reads data on the network)To top
HandleLeavingUser
Returns
int: VLVC return code
Parameters
vlvc_t *p_vlvc : pointer to the vlvc object
int i_leaving_user_id : the leaving user's ID
Description
Does what has to be done when a client has left.
To top
GuiStop
Returns
void
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Wrapper for the GUI callback used to stop it.
To top
ClientNetWrite
Returns
int : number of bytes written
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
void *p_content : data to be sent
int i_size : size of the data to be sent
Description
Used by the client to send dataTo top
ReadOnTemporaryFD
Returns
int : VLVC return code
Parameters
vlc_object_t *p_object : pointer to the common object structure
fd_set *fds_r : pointer to the select()set fds
Description
Handles users that have not been accepted yet.
To top
ReceiveWelcome
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Used by the client to receive the welcome message from theserver.
To top
ServerInitUserInfo
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
vlvc_user_t *p_current_user : output user data to fill.
int i_fd : file descriptor to use to read
user's information
Description
Function called when a user sends a hello message to retreivehis information.
To top
vlvc_HandUser
Returns
int : VLVC return code
int : VLVC return code
int : VLVC return code
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : the user ID
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : the user ID who will be authorized
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : the user ID who will be unauthorized
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : the user ID
int *i_auth_state : the auth state of the user
Description
Callback used by the GUI to raise hand*****************************************************************************/int vlvc_HandUser( vlvc_t *p_vlvc, int i_user_id ){char c_command = VLVC_NET_COMMAND_HAND;if( ClientNetWrite( p_vlvc, &c_command,sizeof( c_command ) ) == VLVC_WRITE_ERROR )return( VLC_EGENERIC );return( VLC_SUCCESS );}/*****************************************************************************Callback used by the GUI to authorize a user*****************************************************************************/int vlvc_AuthUser( vlvc_t *p_vlvc, int i_user_id ){int i_dest_user;char c_command = VLVC_NET_COMMAND_AUTHORIZE;int i_test_auth;if ( i_user_id != p_vlvc->i_self_index ){for( i_dest_user = 0; i_dest_user < p_vlvc->i_nb_users; i_dest_user++ )if( i_dest_user != p_vlvc->i_self_index ){ServerNetWrite( p_vlvc, i_dest_user, &c_command, sizeof( c_command ) );ServerNetWrite( p_vlvc, i_dest_user, &i_user_id, sizeof( i_user_id ) );}if ( p_vlvc->p_parameters->i_conference_mode == VLVC_CONFERENCE_MODE_MEETING ){i_test_auth = 0;for( i_dest_user = 0; i_dest_user < VLVC_MAX_USERS &&!i_test_auth; i_dest_user++ )if ( p_vlvc->p_meeting_auth_users[i_dest_user] == i_user_id )i_test_auth++;if ( !i_test_auth ){for( i_dest_user = 0; i_dest_user < VLVC_MAX_USERS &&!i_test_auth; i_dest_user++ )if ( p_vlvc->p_meeting_auth_users[i_dest_user] == VLVC_AUTH_FREE ){i_test_auth++;p_vlvc->p_meeting_auth_users[i_dest_user] = i_user_id;}vlvc_PlayUser( p_vlvc, i_user_id );}}else if ( p_vlvc->p_parameters->i_conference_mode == VLVC_CONFERENCE_MODE_AMPHITHEATRE ){vlvc_StopUser( p_vlvc, p_vlvc->i_amphi_auth_user );p_vlvc->i_amphi_auth_user = i_user_id;vlvc_PlayUser( p_vlvc, i_user_id );}}return( VLC_SUCCESS );}/*****************************************************************************Callback used by the GUI to unauthorize a user*****************************************************************************/int vlvc_UnauthUser( vlvc_t *p_vlvc, int i_user_id ){int i_dest_user;char c_command = VLVC_NET_COMMAND_UNAUTHORIZE;if( i_user_id != p_vlvc->i_self_index ){for( i_dest_user = 0; i_dest_user < p_vlvc->i_nb_users; i_dest_user++ )if( i_dest_user != p_vlvc->i_self_index ){ServerNetWrite( p_vlvc, i_dest_user, &c_command, sizeof( c_command ) );ServerNetWrite( p_vlvc, i_dest_user, &i_user_id, sizeof( i_user_id ) );}if( p_vlvc->p_parameters->i_conference_mode == VLVC_CONFERENCE_MODE_MEETING ){for( i_dest_user = 0; i_dest_user < VLVC_MAX_USERS; i_dest_user++ )if ( p_vlvc->p_meeting_auth_users[i_dest_user] == i_user_id )p_vlvc->p_meeting_auth_users[i_dest_user] = VLVC_AUTH_FREE;}else if( p_vlvc->p_parameters->i_conference_mode == VLVC_CONFERENCE_MODE_AMPHITHEATRE )if( p_vlvc->i_amphi_auth_user == i_user_id )p_vlvc->i_amphi_auth_user = VLVC_AUTH_FREE;}return( VLC_SUCCESS );}/*****************************************************************************Callback used by the GUI to get the user authorization stateTo top
ClientInitUserInfo
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Initializes the new user data sent by the serverTo top
CopyAndAddBackslashes
Returns
void
Parameters
char *psz_src : the source string
char *psz_dest : the destination string
int i_dest_size : the size of the destination string
Description
Copies the source in the destination, and adds backslashesbefore spaces.
To top
vlvc_PlayUser
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : the user ID
Description
Callback used by the GUI to play the specified userTo top
ServerUserJoin
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_client_id : new client id
Description
Function called on the server when a new user joins to setupvlm controls.
To top
__vlvc_New
Returns
vlvc_t * : pointer to an instance of the vlvc object
Parameters
vlc_object_t * p_this : a pointer to the common object structure
Description
Retreives or creates the vlvc objectTo top
vlvc_StopUser
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : the user ID
Description
Callback used by the GUI to stop the specified userTo top
GetClientIpAddress
Returns
int : VLVC return code
Parameters
int i_fd : file descriptor associated with the IP
address to retreive
char *psz_client_ip : output buffer to store the IP address
Description
Retreives the IP address associated with the given filedescriptor.
To top
ClientReceiveCodecsData
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Function used by the client to receive the codecs to use whenforced by the server.
To top
vlvc_GetUserName
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : the user ID
char *psz_user_name : buffer to store the user name
Description
Callback used by the GUI to get the specified user's nameTo top
SetupClientsOutputsChatRoom
Returns
void
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Setup all client output for the chat room modeTo top
vlvc_NetSendMessage
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
char *psz_message : message to send
int i_user_dest : user to send the message to
Description
Callback used by the GUI when the user wants to send a message.
To top
vlvc_GetNbUsers
Returns
int : the number of users
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Callback used by the GUI to get the number of users.
To top
GuiNbClientChange
Returns
void
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : the userid to whom we want to send data
Description
Wrapper for the GUI callback used to notify a change of thenumber of users.
To top
SendWelcome
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_index : the client id to send welcome to
Description
Function called when a user sends a hello message, to welcome himTo top
GuiUnauthUser
Returns
void
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : the userid to whom we want to send data
Description
Wrapper for the GUI callback used to notify a change of theunauth userTo top
HandleHello
Returns
int: VLVC return code, used to know if we need to quit
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_fd : client file descriptor
int *i_client_id : client id to be filled
Description
Function called when a user sends a hello message.
To top
SetupClientsOutputsConference
Returns
void
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Setup all client output for the conference modeTo top
ClientReceiveNotWelcomeData
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Called by the client to receive the not welcome data.
To top
ReceiveMessage
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
vlvc_message_header_t *message_header : message header to be
filled
char **psz_message : message content to be filled
Description
When a message is received, fills its header and contentTo top
ServerNetWrite
Returns
int : number of bytes written
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
int i_user_id : the user id we want to send data to
void *p_content : data to be sent
int i_size : size of the data to be sent
Description
Used by the server to send dataTo top
ClientUserUnauthorize
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Function called on the client when a user has been unauthorized.
We first have to read the leaving client ID, then stop its VLMcontrols and clean its data. Then inform the GUI.
To top
HandleVersion
Parameters
vlvc_t *p_vlvc : pointer to the vlvc object
int i_user_id : the concerned user's ID
char c_message_type : the message type received from the client
Description
Checks if the client's version matches the server's versionTo top
ServerMode
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
Description
Called when VLVC is started in server modeTo top
DoClient
Returns
int : VLVC return code
Parameters
vlc_object_t * p_object : pointer to the common object structure
Description
Used by the client to process server messages in a loop.
This function is launched as a thread.
To top
ClientTryMulticast
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc: a pointer to the vlvc object
Description
The client will try to receive message from the multicast IP.
To top
ClientNetRead
Returns
int : number of bytes written
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
void *p_content : buffer to store read data
int i_size : size of the data to be read
Description
Used by the client to read dataTo top
vlvc_SetCallbackDisableHandBtn
Returns
int : VLVC return code
Parameters
vlvc_t *p_vlvc : a pointer to the vlvc object
void (*) ( int, const char *, int, void * ): pointer to the
callback function
Description
Called by the GUI to provide a callback used to disable the"Raise Hand" buttonTo top