libinfinity-0.6 Reference Manual: InfCommunicationHostedGroup

## InfCommunicationHostedGroup InfCommunicationHostedGroup — Communication group opened by the local host |

## Stability Level

Unstable, unless otherwise indicated

## Functions

void | inf_communication_hosted_group_add_method ()
void | inf_communication_hosted_group_add_member ()
void | inf_communication_hosted_group_remove_member ()

## Types and Values

struct | InfCommunicationHostedGroup
struct | InfCommunicationHostedGroupClass

## Object Hierarchy

        GObject
        ╰── InfCommunicationGroup
            ╰── InfCommunicationHostedGroup

## Includes

    #include <libinfinity/communication/inf-communication-hosted-group.h>

## Description

InfCommunicationHostedGroup is a InfCommunicationHostedGroup opened on the local host. It allows adding other hosts to the group via `inf_communication_hosted_group_add_member()`, and to remove hosts via `inf_communication_hosted_group_remove_member()`.

## Functions

### inf_communication_hosted_group_add_method ()

    void
    inf_communication_hosted_group_add_method
                                   (InfCommunicationHostedGroup *group,
                                    const gchar *method);

Adds a method to the hosted group. When a connection from a given network is added to the group the first time, a InfCommunicationMethod is instantiated to handle messaging for the group within this network. The first method added will be tried first. If the communication manager does support it (meaning `inf_communication_manager_get_factory_for()` for the connection's network and the chosen method returns non-`NULL`), then it will be used, otherwise the next method will be tried, etc. If no method is supported, or no methods are added to the group, then the "central" method will be used as a fallback.

#### Parameters

group | A InfCommunicationHostedGroup. |
method | The method name to add. |

### inf_communication_hosted_group_add_member ()

    void
    inf_communication_hosted_group_add_member
                                   (InfCommunicationHostedGroup *group,
                                    InfXmlConnection *connection);

Adds `connection` as a member to `group` . On the remote site, a InfCommunicationJoinedGroup with the same name and method used for `connection` (see `inf_communication_group_get_method_for_connection()`) needs to be created for successful communication.

#### Parameters

group | A InfCommunicationGroup. |
connection | A InfXmlConnection to add to group. |

### inf_communication_hosted_group_remove_member ()

    void
    inf_communication_hosted_group_remove_member
                                   (InfCommunicationHostedGroup *grp,
                                    InfXmlConnection *connection);

Removes `connection` 's membership from `group` . On the remote site, the corresponding InfCommunicationJoinedGroup needs to be freed.

#### Parameters

grp | A InfCommunicationGroup. |
connection | The `InfXmlConnection` to remove from the group. |

## Types and Values

### struct InfCommunicationHostedGroup

    struct InfCommunicationHostedGroup;

InfCommunicationHostedGroup is an opaque data type. You should only access it via the public API functions.

### struct InfCommunicationHostedGroupClass

    struct InfCommunicationHostedGroupClass {
    };

This structure does not contain any public fields.

## See Also

InfCommunicationGroup, InfCommunicationManager