meanwhile  1.1.0
Data Structures | Defines | Enumerations | Functions
mw_srvc_conf.h File Reference
#include <glib.h>
#include "mw_common.h"

Go to the source code of this file.

Data Structures

struct  mwConferenceHandler
 Handler structure used to provide callbacks for an instance of the conferencing service. More...

Defines

#define mwConference_reject(c, r, t)   mwConference_destroy((c),(r),(t))
#define mwService_CONFERENCE   0x80000010
 Type identifier for the conference service.

Enumerations

enum  mwConferenceState {
  mwConference_NEW,
  mwConference_PENDING,
  mwConference_INVITED,
  mwConference_OPEN,
  mwConference_CLOSING,
  mwConference_ERROR,
  mwConference_UNKNOWN
}

Functions

int mwConference_accept (struct mwConference *conf)
 accept a conference invitation.
int mwConference_destroy (struct mwConference *conf, guint32 reason, const char *text)
 Leave and close an existing conference, or reject an invitation.
gpointer mwConference_getClientData (struct mwConference *conf)
 reference associated client data
GList * mwConference_getMembers (struct mwConference *conf)
 a mwIdBlock list of the members of the conference.
const char * mwConference_getName (struct mwConference *conf)
struct mwServiceConference * mwConference_getService (struct mwConference *conf)
const char * mwConference_getTitle (struct mwConference *conf)
int mwConference_invite (struct mwConference *conf, struct mwIdBlock *who, const char *text)
 invite another user to an ACTIVE conference
struct mwConference * mwConference_new (struct mwServiceConference *srvc, const char *title)
 Allocate a new conference, in state NEW with the given title.
int mwConference_open (struct mwConference *conf)
 Initiate a conference.
void mwConference_removeClientData (struct mwConference *conf)
 remove associated client data if any, and call the cleanup function on the data as necessary
int mwConference_sendText (struct mwConference *conf, const char *text)
 send a text message over an open conference
int mwConference_sendTyping (struct mwConference *conf, gboolean typing)
 send typing notification over an open conference
void mwConference_setClientData (struct mwConference *conf, gpointer data, GDestroyNotify clear)
 associate arbitrary client data and an optional cleanup function with a conference.
GList * mwServiceConference_getConferences (struct mwServiceConference *srvc)
 a mwConference list of the conferences in this service.
struct mwConferenceHandler * mwServiceConference_getHandler (struct mwServiceConference *srvc)
struct mwServiceConference * mwServiceConference_new (struct mwSession *sess, struct mwConferenceHandler *handler)
 Allocate a new conferencing service, attaching the given handler.

Define Documentation

#define mwConference_reject (   c,
  r,
  t 
)    mwConference_destroy((c),(r),(t))
#define mwService_CONFERENCE   0x80000010

Type identifier for the conference service.


Enumeration Type Documentation

Enumerator:
mwConference_NEW 

new outgoing conference

mwConference_PENDING 

outgoing conference pending creation

mwConference_INVITED 

invited to incoming conference

mwConference_OPEN 

conference open and active

mwConference_CLOSING 

conference is closing

mwConference_ERROR 

conference is closing due to error

mwConference_UNKNOWN 

unable to determine conference state


Function Documentation

int mwConference_accept ( struct mwConference *  conf)

accept a conference invitation.

Conference must be in the state INVITED.

int mwConference_destroy ( struct mwConference *  conf,
guint32  reason,
const char *  text 
)

Leave and close an existing conference, or reject an invitation.

Triggers mwServiceConfHandler::conf_closed and free's the conference.

gpointer mwConference_getClientData ( struct mwConference *  conf)

reference associated client data

GList* mwConference_getMembers ( struct mwConference *  conf)

a mwIdBlock list of the members of the conference.

The GList will need to be free'd after use

const char* mwConference_getName ( struct mwConference *  conf)
Returns:
unique conference name
struct mwServiceConference* mwConference_getService ( struct mwConference *  conf) [read]
Returns:
the owning service of a conference
const char* mwConference_getTitle ( struct mwConference *  conf)
Returns:
conference title
int mwConference_invite ( struct mwConference *  conf,
struct mwIdBlock *  who,
const char *  text 
)

invite another user to an ACTIVE conference

Parameters:
confconference
whouser to invite
textinvitation message
struct mwConference* mwConference_new ( struct mwServiceConference *  srvc,
const char *  title 
) [read]

Allocate a new conference, in state NEW with the given title.

See also:
mwConference_create
int mwConference_open ( struct mwConference *  conf)

Initiate a conference.

Conference must be in state NEW. If no name or title for the conference has been set, they will be generated. Conference will be placed into state PENDING.

remove associated client data if any, and call the cleanup function on the data as necessary

int mwConference_sendText ( struct mwConference *  conf,
const char *  text 
)

send a text message over an open conference

int mwConference_sendTyping ( struct mwConference *  conf,
gboolean  typing 
)

send typing notification over an open conference

void mwConference_setClientData ( struct mwConference *  conf,
gpointer  data,
GDestroyNotify  clear 
)

associate arbitrary client data and an optional cleanup function with a conference.

If there is already client data with a clear function, it will not be called.

a mwConference list of the conferences in this service.

The GList will need to be destroyed with g_list_free after use

Returns:
the conference handler for the service
struct mwServiceConference* mwServiceConference_new ( struct mwSession *  sess,
struct mwConferenceHandler *  handler 
) [read]

Allocate a new conferencing service, attaching the given handler.

Parameters:
sessowning session
handlerhandler providing call-back functions for the service