Changeset dc1edbd for global.c


Ignore:
Timestamp:
May 23, 2011, 8:57:46 PM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
117b2ba
Parents:
08e9842
git-author:
David Benjamin <davidben@mit.edu> (02/26/11 16:32:51)
git-committer:
David Benjamin <davidben@mit.edu> (05/23/11 20:57:46)
Message:
Add a GSource for AIM events

The AIM file descriptor hack is somewhat less of a hack now. Remove code
related to the old AIM implementation now that it's been superceded.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r47128d9 rdc1edbd  
    696696}
    697697
    698 int owl_global_is_doaimevents(const owl_global *g)
    699 {
    700   if (g->aim_doprocessing) return(1);
    701   return(0);
     698bool owl_global_is_doaimevents(const owl_global *g)
     699{
     700  return g->aim_event_source != NULL;
    702701}
    703702
    704703void owl_global_set_doaimevents(owl_global *g)
    705704{
    706   g->aim_doprocessing=1;
     705  if (g->aim_event_source)
     706    return;
     707  g->aim_event_source = owl_aim_event_source_new(owl_global_get_aimsess(g));
     708  g_source_attach(g->aim_event_source, NULL);
    707709}
    708710
    709711void owl_global_set_no_doaimevents(owl_global *g)
    710712{
    711   g->aim_doprocessing=0;
     713  if (!g->aim_event_source)
     714    return;
     715  g_source_destroy(g->aim_event_source);
     716  g_source_unref(g->aim_event_source);
     717  g->aim_event_source = NULL;
    712718}
    713719
Note: See TracChangeset for help on using the changeset viewer.