Changeset df0d93a


Ignore:
Timestamp:
Jun 1, 2003, 3:14:31 PM (21 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
3abf28b
Parents:
31e48a3
Message:
cleaned up the info funciton, put back additional data
  for outgoing messages
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r31e48a3 rdf0d93a  
    12251225  owl_fmtext_append_normal(&fm, buff);
    12261226  owl_fmtext_append_normal(&fm, "\n");
    1227   if (owl_message_is_type_zephyr(m)) {
    1228     owl_fmtext_append_normal(&fm, "Type      : zephyr\n");
    1229   } else if (owl_message_is_type_admin(m)) {
    1230     owl_fmtext_append_normal(&fm, "Type      : admin\n");
    1231   } else if (owl_message_is_type_generic(m)) {
    1232     owl_fmtext_append_normal(&fm, "Type      : generic\n");
    1233   } else if (owl_message_is_type_aim(m)) {
    1234     owl_fmtext_append_normal(&fm, "Type      : aim\n");
    1235   } else {
    1236     owl_fmtext_append_normal(&fm, "Type      : unknown\n");
    1237   }
     1227
     1228  owl_fmtext_append_normal(&fm, "Type      : ");
     1229  owl_fmtext_append_bold(&fm, owl_message_type_to_string(m));
     1230  owl_fmtext_append_normal(&fm, "\n");
     1231
    12381232  if (owl_message_is_direction_in(m)) {
    12391233    owl_fmtext_append_normal(&fm, "Direction : in\n");
     
    12451239    owl_fmtext_append_normal(&fm, "Direction : unknown\n");
    12461240  }
     1241
    12471242  owl_fmtext_append_normal(&fm, "Time      : ");
    12481243  owl_fmtext_append_normal(&fm, owl_message_get_timestr(m));
    12491244  owl_fmtext_append_normal(&fm, "\n");
    12501245
    1251   owl_fmtext_append_normal(&fm, "Sender    : ");
    1252   owl_fmtext_append_normal(&fm, owl_message_get_sender(m));
    1253   owl_fmtext_append_normal(&fm, "\n");
    1254 
    1255   owl_fmtext_append_normal(&fm, "Recipient : ");
    1256   owl_fmtext_append_normal(&fm, owl_message_get_recipient(m));
    1257   owl_fmtext_append_normal(&fm, "\n");
    1258 
    1259 
     1246  if (!owl_message_is_type_admin(m)) {
     1247    owl_fmtext_append_normal(&fm, "Sender    : ");
     1248    owl_fmtext_append_normal(&fm, owl_message_get_sender(m));
     1249    owl_fmtext_append_normal(&fm, "\n");
     1250   
     1251    owl_fmtext_append_normal(&fm, "Recipient : ");
     1252    owl_fmtext_append_normal(&fm, owl_message_get_recipient(m));
     1253    owl_fmtext_append_normal(&fm, "\n");
     1254  }
     1255   
    12601256  if (owl_message_is_type_zephyr(m)) {
    12611257    owl_fmtext_append_bold(&fm, "  Zephyr Specific Info\n");
    12621258   
     1259    owl_fmtext_append_normal(&fm, "Class     : ");
     1260    owl_fmtext_append_normal(&fm, owl_message_get_class(m));
     1261    owl_fmtext_append_normal(&fm, "\n");
     1262    owl_fmtext_append_normal(&fm, "Instance  : ");
     1263    owl_fmtext_append_normal(&fm, owl_message_get_instance(m));
     1264    owl_fmtext_append_normal(&fm, "\n");
     1265    owl_fmtext_append_normal(&fm, "Opcode    : ");
     1266    owl_fmtext_append_normal(&fm, owl_message_get_opcode(m));
     1267    owl_fmtext_append_normal(&fm, "\n");
     1268   
     1269    owl_fmtext_append_normal(&fm, "Time      : ");
     1270    owl_fmtext_append_normal(&fm, owl_message_get_timestr(m));
     1271    owl_fmtext_append_normal(&fm, "\n");
     1272
    12631273    if (owl_message_is_direction_in(m)) {
    12641274      n=owl_message_get_notice(m);
    1265       owl_fmtext_append_normal(&fm, "Class     : ");
    1266       owl_fmtext_append_normal(&fm, owl_message_get_class(m));
    1267       owl_fmtext_append_normal(&fm, "\n");
    1268       owl_fmtext_append_normal(&fm, "Instance  : ");
    1269       owl_fmtext_append_normal(&fm, owl_message_get_instance(m));
    1270       owl_fmtext_append_normal(&fm, "\n");
    1271       owl_fmtext_append_normal(&fm, "Opcode    : ");
    1272       owl_fmtext_append_normal(&fm, owl_message_get_opcode(m));
    1273       owl_fmtext_append_normal(&fm, "\n");
     1275
    12741276      owl_fmtext_append_normal(&fm, "Kind      : ");
    12751277      if (n->z_kind==UNSAFE) {
     
    12941296        owl_fmtext_append_normal(&fm, "ILLEGAL VALUE\n");
    12951297      }
    1296 
    1297       owl_fmtext_append_normal(&fm, "Time      : ");
    1298       owl_fmtext_append_normal(&fm, owl_message_get_timestr(m));
    1299       owl_fmtext_append_normal(&fm, "\n");
    13001298      owl_fmtext_append_normal(&fm, "Host      : ");
    13011299      owl_fmtext_append_normal(&fm, owl_message_get_hostname(m));
     
    13551353
    13561354  if (owl_message_is_type_aim(m)) {
    1357 
     1355    owl_fmtext_append_bold(&fm, "  AIM Specific Info\n");   
    13581356  }
    13591357 
  • message.c

    r0ff8fb57 rdf0d93a  
    242242  return(0);
    243243}
     244
     245char *owl_message_type_to_string(owl_message *m)
     246{
     247  if (m->type==OWL_MESSAGE_TYPE_ADMIN) return("admin");
     248  if (m->type==OWL_MESSAGE_TYPE_GENERIC) return("generic");
     249  if (m->type==OWL_MESSAGE_TYPE_ZEPHYR) return("zephyr");
     250  if (m->type==OWL_MESSAGE_TYPE_AIM) return("aim");
     251  if (m->type==OWL_MESSAGE_TYPE_JABBER) return("jabber");
     252  if (m->type==OWL_MESSAGE_TYPE_ICQ) return("icq");
     253  if (m->type==OWL_MESSAGE_TYPE_MSN) return("msn");
     254  return("unknown");
     255}
     256
    244257
    245258char *owl_message_get_text(owl_message *m)
  • owl_prototypes.h

    r31e48a3 rdf0d93a  
    582582extern int owl_message_is_type_aim(owl_message *m);
    583583extern int owl_message_is_type_generic(owl_message *m);
     584extern char *owl_message_type_to_string(owl_message *m);
    584585extern char *owl_message_get_text(owl_message *m);
    585586extern void owl_message_set_direction_in(owl_message *m);
Note: See TracChangeset for help on using the changeset viewer.