Changeset c453ada for global.c


Ignore:
Timestamp:
May 31, 2008, 11:40:29 PM (13 years ago)
Author:
Geoffrey Thomas <geofft@mit.edu>
Branches:
barnowl_perlaim
Children:
7a1c90d
Parents:
b1fd36e
Message:
Remove aim.c. buddylist.c, buddy.c, libfaim, and everything that uses them.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r9f4e3f8 rc453ada  
    9797  owl_popwin_init(&(g->pw));
    9898
    99   g->aim_screenname=NULL;
    100   g->aim_screenname_for_filters=NULL;
    101   g->aim_loggedin=0;
    102   owl_timer_create_countdown(&(g->aim_noop_timer), 30);
    103   owl_timer_create_countdown(&(g->aim_ignorelogin_timer), 0);
    104   owl_timer_create_countdown(&(g->aim_buddyinfo_timer), 60);
    105   owl_buddylist_init(&(g->buddylist));
    106    
    10799  g->havezephyr=0;
    108   g->haveaim=0;
    109   owl_global_set_no_doaimevents(g);
    110100
    111101  owl_errqueue_init(&(g->errqueue));
     
    733723}
    734724
    735 /* AIM stuff */
    736 
    737 int owl_global_is_aimloggedin(owl_global *g)
    738 {
    739   if (g->aim_loggedin) return(1);
    740   return(0);
    741 }
    742 
    743 char *owl_global_get_aim_screenname(owl_global *g)
    744 {
    745   if (owl_global_is_aimloggedin(g)) {
    746     return (g->aim_screenname);
    747   }
    748   return("");
    749 }
    750 
    751 char *owl_global_get_aim_screenname_for_filters(owl_global *g)
    752 {
    753   if (owl_global_is_aimloggedin(g)) {
    754     return (g->aim_screenname_for_filters);
    755   }
    756   return("");
    757 }
    758 
    759 void owl_global_set_aimloggedin(owl_global *g, char *screenname)
    760 {
    761   char *sn_escaped, *quote;
    762   g->aim_loggedin=1;
    763   if (g->aim_screenname) owl_free(g->aim_screenname);
    764   if (g->aim_screenname_for_filters) owl_free(g->aim_screenname_for_filters);
    765   g->aim_screenname=owl_strdup(screenname);
    766   sn_escaped = owl_text_quote(screenname, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
    767   quote = owl_getquoting(sn_escaped);
    768   g->aim_screenname_for_filters=owl_sprintf("%s%s%s", quote, sn_escaped, quote);
    769   owl_free(sn_escaped);
    770 }
    771 
    772 void owl_global_set_aimnologgedin(owl_global *g)
    773 {
    774   g->aim_loggedin=0;
    775 }
    776 
    777 int owl_global_is_doaimevents(owl_global *g)
    778 {
    779   if (g->aim_doprocessing) return(1);
    780   return(0);
    781 }
    782 
    783 void owl_global_set_doaimevents(owl_global *g)
    784 {
    785   g->aim_doprocessing=1;
    786 }
    787 
    788 void owl_global_set_no_doaimevents(owl_global *g)
    789 {
    790   g->aim_doprocessing=0;
    791 }
    792 
    793 aim_session_t *owl_global_get_aimsess(owl_global *g)
    794 {
    795   return(&(g->aimsess));
    796 }
    797 
    798 aim_conn_t *owl_global_get_bosconn(owl_global *g)
    799 {
    800   return(&(g->bosconn));
    801 }
    802 
    803 void owl_global_set_bossconn(owl_global *g, aim_conn_t *conn)
    804 {
    805   g->bosconn=*conn;
    806 }
    807 
    808 int owl_global_is_aimnop_time(owl_global *g)
    809 {
    810   if (owl_timer_is_expired(&(g->aim_noop_timer))) return(1);
    811   return(0);
    812 }
    813 
    814 void owl_global_aimnop_sent(owl_global *g)
    815 {
    816   owl_timer_reset(&(g->aim_noop_timer));
    817 }
    818 
    819 owl_timer *owl_global_get_aim_login_timer(owl_global *g)
    820 {
    821   return(&(g->aim_ignorelogin_timer));
    822 }
    823 
    824725/* message queue */
    825726
     
    883784}
    884785
    885 void owl_global_set_haveaim(owl_global *g)
    886 {
    887   g->haveaim=1;
    888 }
    889 
    890 int owl_global_is_haveaim(owl_global *g)
    891 {
    892   if (g->haveaim) return(1);
    893   return(0);
    894 }
    895 
    896786void owl_global_set_havezephyr(owl_global *g)
    897787{
     
    903793  if (g->havezephyr) return(1);
    904794  return(0);
    905 }
    906 
    907 owl_timer *owl_global_get_aim_buddyinfo_timer(owl_global *g)
    908 {
    909   return(&(g->aim_buddyinfo_timer));
    910795}
    911796
Note: See TracChangeset for help on using the changeset viewer.