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...

## Macros

#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.

## Macro Definition Documentation

## mwConference_reject

#define mwConference_reject | ( |  | c,
|  |  | r,
|  |  | t
| ) |  | mwConference_destroy((c),(r),(t))

## mwService_CONFERENCE

#define mwService_CONFERENCE 0x80000010

Type identifier for the conference service.

## Enumeration Type Documentation

## mwConferenceState

enum mwConferenceState

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

## mwConference_accept()

int mwConference_accept | ( | struct mwConference * | conf | ) |

accept a conference invitation.

Conference must be in the state INVITED.

## mwConference_destroy()

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.

## mwConference_getClientData()

gpointer mwConference_getClientData | ( | struct mwConference * | conf | ) |

reference associated client data

## mwConference_getMembers()

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

## mwConference_getName()

const char * mwConference_getName | ( | struct mwConference * | conf | ) |

Returns
  unique conference name

## mwConference_getService()

struct mwServiceConference * mwConference_getService | ( | struct mwConference * | conf | ) |

Returns
  the owning service of a conference

## mwConference_getTitle()

const char * mwConference_getTitle | ( | struct mwConference * | conf | ) |

Returns
  conference title

## mwConference_invite()

int mwConference_invite | ( | struct mwConference * | conf,
|  | struct mwIdBlock * | who,
|  | const char * | text
| ) |  |

invite another user to an ACTIVE conference

Parameters

  conf | conference
  who | user to invite
  text | invitation message

## mwConference_new()

struct mwConference * mwConference_new | ( | struct mwServiceConference * | srvc,
|  | const char * | title
| ) |  |

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

See also
  mwConference_create

## mwConference_open()

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.

## mwConference_removeClientData()

void mwConference_removeClientData | ( | struct mwConference * | conf | ) |

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

## mwConference_sendText()

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

send a text message over an open conference

## mwConference_sendTyping()

int mwConference_sendTyping | ( | struct mwConference * | conf,
|  | gboolean | typing
| ) |  |

send typing notification over an open conference

## mwConference_setClientData()

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.

## mwServiceConference_getConferences()

GList * mwServiceConference_getConferences | ( | struct mwServiceConference * | srvc | ) |

a mwConference list of the conferences in this service.

The GList will need to be destroyed with g_list_free after use

## mwServiceConference_getHandler()

struct mwConferenceHandler * mwServiceConference_getHandler | ( | struct mwServiceConference * | srvc | ) |

Returns
  the conference handler for the service

## mwServiceConference_new()

struct mwServiceConference * mwServiceConference_new | ( | struct mwSession * | sess,
|  | struct mwConferenceHandler * | handler
| ) |  |

Allocate a new conferencing service, attaching the given handler.

Parameters

  sess | owning session
  handler | handler providing call-back functions for the service