Program Structure for Groups

Programs using the group facility follow this template.

  1. Determine the group name and property values.

    (See also, Restrictions on Names.)

  2. Subscribe to ordinal update advisories.

    Content matchers can filter for these advisories by matching the string value ORDINAL_UPDATE in the name field, and the group name in the group field.

    The ordinal field contains the group member’s new ordinal.

    The subscriber callback must change the operating role of the application process according to the new ordinal.

  3. Join the group, using the join API call.
  4. Explicitly leave the group, using the leave API call.

    Programs must leave all groups before closing the realm object.