Changeset 0af5f9d for global.c


Ignore:
Timestamp:
Mar 25, 2011, 3:55:41 AM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Children:
bb54113
Parents:
37d188f
git-author:
David Benjamin <davidben@mit.edu> (02/26/11 16:32:51)
git-committer:
David Benjamin <davidben@mit.edu> (03/25/11 03:55:41)
Message:
Add a GSource for AIM events

This is somewhat less of a hack now.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r37d188f r0af5f9d  
    697697}
    698698
    699 int owl_global_is_doaimevents(const owl_global *g)
    700 {
    701   if (g->aim_doprocessing) return(1);
    702   return(0);
     699bool owl_global_is_doaimevents(const owl_global *g)
     700{
     701  return g->aim_event_source != NULL;
    703702}
    704703
    705704void owl_global_set_doaimevents(owl_global *g)
    706705{
    707   g->aim_doprocessing=1;
     706  if (g->aim_event_source)
     707    return;
     708  g->aim_event_source = owl_aim_event_source_new(owl_global_get_aimsess(g));
     709  g_source_attach(g->aim_event_source, NULL);
    708710}
    709711
    710712void owl_global_set_no_doaimevents(owl_global *g)
    711713{
    712   g->aim_doprocessing=0;
     714  if (!g->aim_event_source)
     715    return;
     716  g_source_destroy(g->aim_event_source);
     717  g_source_unref(g->aim_event_source);
     718  g->aim_event_source = NULL;
    713719}
    714720
Note: See TracChangeset for help on using the changeset viewer.