Changeset 421c8ef7


Ignore:
Timestamp:
Oct 29, 2006, 5:01:52 AM (14 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
3c9012b
Parents:
4692b70
Message:
Adding some missing owl_message_type_is functions.
Ensuring all the attributes of a message make it out to the perl hash.
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • message.c

    rdd16bdd r421c8ef7  
    122122
    123123  if (m->invalid_format) {
    124     /* for now we assume there's jsut the one view and use that style */
     124    /* for now we assume there's just the one view and use that style */
    125125    v=owl_global_get_current_view(&g);
    126126    s=owl_view_get_style(v);
     
    353353}
    354354
     355int owl_message_is_type_generic(owl_message *m)
     356{
     357  if (m->type==OWL_MESSAGE_TYPE_GENERIC) return(1);
     358  return(0);
     359}
     360
     361int owl_message_is_type_zephyr(owl_message *m)
     362{
     363  if (m->type==OWL_MESSAGE_TYPE_ZEPHYR) return(1);
     364  return(0);
     365}
     366
     367int owl_message_is_type_aim(owl_message *m)
     368{
     369  if (m->type==OWL_MESSAGE_TYPE_AIM) return(1);
     370  return(0);
     371}
     372
     373int owl_message_is_type_jabber(owl_message *m)
     374{
     375  if (m->type==OWL_MESSAGE_TYPE_JABBER) return(1);
     376
     377  return(0);
     378}
     379
     380int owl_message_is_type_icq(owl_message *m)
     381{
     382  if (m->type==OWL_MESSAGE_TYPE_ICQ) return(1);
     383
     384  return(0);
     385}
     386
     387int owl_message_is_type_yahoo(owl_message *m)
     388{
     389  if (m->type==OWL_MESSAGE_TYPE_YAHOO) return(1);
     390
     391  return(0);
     392}
     393
     394int owl_message_is_type_msn(owl_message *m)
     395{
     396  if (m->type==OWL_MESSAGE_TYPE_MSN) return(1);
     397
     398  return(0);
     399}
     400
    355401int owl_message_is_type_loopback(owl_message *m)
    356402{
     
    359405}
    360406
    361 int owl_message_is_type_zephyr(owl_message *m)
    362 {
    363   if (m->type==OWL_MESSAGE_TYPE_ZEPHYR) return(1);
    364   return(0);
    365 }
    366 
    367 int owl_message_is_type_aim(owl_message *m)
    368 {
    369   if (m->type==OWL_MESSAGE_TYPE_AIM) return(1);
    370   return(0);
    371 }
    372 
    373407int owl_message_is_pseudo(owl_message *m)
    374408{
    375409  if (owl_message_get_attribute_value(m, "pseudo")) return(1);
    376   return(0);
    377 }
    378 
    379 int owl_message_is_type_generic(owl_message *m)
    380 {
    381   if (m->type==OWL_MESSAGE_TYPE_GENERIC) return(1);
    382410  return(0);
    383411}
  • perlconfig.c

    rdb8b00b r421c8ef7  
    3232  char *ptr, *blessas;
    3333  int i, j;
     34  owl_pair *pair;
    3435
    3536  if (!m) return &PL_sv_undef;
     
    5758  }
    5859
     60  j=owl_list_get_size(&(m->attributes));
     61  for(i=0; i<j; i++) {
     62    pair=owl_list_get_element(&(m->attributes), i);
     63    hv_store(h, owl_pair_get_key(pair), strlen(owl_pair_get_key(pair)),
     64             newSVpv(owl_pair_get_value(pair),0),0);
     65  }
     66 
    5967  MSG2H(h, type);
    6068  MSG2H(h, direction);
     
    8088  if (owl_message_is_type_zephyr(m))       blessas = "owl::Message::Zephyr";
    8189  else if (owl_message_is_type_aim(m))     blessas = "owl::Message::AIM";
     90  else if (owl_message_is_type_jabber(m))  blessas = "owl::Message::Jabber";
    8291  else if (owl_message_is_type_admin(m))   blessas = "owl::Message::Admin";
    8392  else if (owl_message_is_type_generic(m)) blessas = "owl::Message::Generic";
  • perlwrap.pm

    rdd16bdd r421c8ef7  
    8989sub is_deleted  { return shift->{"deleted"}; }
    9090
     91sub is_admin    { return (shift->{"type"} eq "admin"); }
     92sub is_generic  { return (shift->{"type"} eq "generic"); }
    9193sub is_zephyr   { return (shift->{"type"} eq "zephyr"); }
    9294sub is_aim      { return (shift->{"type"} eq "aim"); }
    93 sub is_admin    { return (shift->{"type"} eq "admin"); }
    94 sub is_generic  { return (shift->{"type"} eq "generic"); }
    9595sub is_jabber   { return (shift->{"type"} eq "jabber"); }
     96sub is_icq      { return (shift->{"type"} eq "icq"); }
     97sub is_yahoo    { return (shift->{"type"} eq "yahoo"); }
     98sub is_msn      { return (shift->{"type"} eq "msn"); }
     99sub is_loopback { return (shift->{"type"} eq "loopback"); }
    96100
    97101# These are overridden by appropriate message types
Note: See TracChangeset for help on using the changeset viewer.