예제 #1
0
GList *mwServiceDirectory_getDirectories(struct mwServiceDirectory *srvc) {
  GList *bl, *ret = NULL;
  
  g_return_val_if_fail(srvc != NULL, NULL);
  g_return_val_if_fail(srvc->books != NULL, NULL);

  bl = map_collect_values(srvc->books);
  for( ; bl; bl = g_list_delete_link(bl, bl)) {
    struct mwAddressBook *book = bl->data;
    ret = g_list_concat(ret, map_collect_values(book->dirs));
  }

  return ret;
}
예제 #2
0
GList *mwPlace_getMembers(struct mwPlace *place) {
  GList *l, *ll;

  g_return_val_if_fail(place != NULL, NULL);
  g_return_val_if_fail(place->members != NULL, NULL);

  ll = map_collect_values(place->members);
  for(l = ll; l; l = l->next) {
    struct place_member *pm = l->data;
    l->data = &pm->idb;
    g_info("collected member %u: %s, %s", pm->place_id,
	   NSTR(pm->idb.user), NSTR(pm->idb.community));
  }

  return ll;
}
예제 #3
0
static void recv_accept(struct mwServiceAware *srvc,
			struct mwChannel *chan,
			struct mwMsgChannelAccept *msg) {

  g_return_if_fail(srvc->channel != NULL);
  g_return_if_fail(srvc->channel == chan);

  if(MW_SERVICE_IS_STARTING(MW_SERVICE(srvc))) {
    GList *list = NULL;

    list = map_collect_values(srvc->entries);
    send_add(chan, list);
    g_list_free(list);

    send_attrib_list(srvc);

    mwService_started(MW_SERVICE(srvc));

  } else {
    mwChannel_destroy(chan, ERR_FAILURE, NULL);
  }
}
예제 #4
0
GList *mwAddressBook_getDirectories(struct mwAddressBook *book) {
  g_return_val_if_fail(book != NULL, NULL);
  g_return_val_if_fail(book->dirs != NULL, NULL);

  return map_collect_values(book->dirs);
}
예제 #5
0
GList *mwServiceDirectory_getAddressBooks(struct mwServiceDirectory *srvc) {
  g_return_val_if_fail(srvc != NULL, NULL);
  g_return_val_if_fail(srvc->books != NULL, NULL);

  return map_collect_values(srvc->books);
}
예제 #6
0
GList *mwConference_getMembers(struct mwConference *conf) {
  g_return_val_if_fail(conf != NULL, NULL);
  g_return_val_if_fail(conf->members != NULL, NULL);

  return map_collect_values(conf->members);
}