- Timestamp:
- Oct 27, 2006, 1:19:54 AM (18 years ago)
- Branches:
- master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 1b6b2f3
- Parents:
- 39c036d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
message.c
r8298425 rdd16bdd 341 341 m->type=OWL_MESSAGE_TYPE_AIM; 342 342 } 343 344 void owl_message_set_type(owl_message *m, int type) 345 { 346 m->type=type; 347 } 343 348 344 349 int owl_message_is_type_admin(owl_message *m) … … 396 401 { 397 402 m->direction=OWL_MESSAGE_DIRECTION_NONE; 403 } 404 405 void owl_message_set_direction(owl_message *m, int direction) 406 { 407 m->direction=direction; 398 408 } 399 409 … … 631 641 } 632 642 643 int owl_message_parse_type(char *type) { 644 if(!strcmp(type, "admin")) { 645 return OWL_MESSAGE_TYPE_ADMIN; 646 } else if(!strcmp(type, "zephyr")) { 647 return OWL_MESSAGE_TYPE_ZEPHYR; 648 } if(!strcmp(type, "aim")) { 649 return OWL_MESSAGE_TYPE_AIM; 650 } else if(!strcmp(type, "jabber")) { 651 return OWL_MESSAGE_TYPE_JABBER; 652 } else if(!strcmp(type, "icq")) { 653 return OWL_MESSAGE_TYPE_ICQ; 654 } else if(!strcmp(type, "yahoo")) { 655 return OWL_MESSAGE_TYPE_YAHOO; 656 } else if(!strcmp(type, "msn")) { 657 return OWL_MESSAGE_TYPE_MSN; 658 } else if(!strcmp(type, "loopback")) { 659 return OWL_MESSAGE_TYPE_LOOPBACK; 660 } else { 661 return OWL_MESSAGE_TYPE_GENERIC; 662 } 663 } 664 633 665 char *owl_message_get_direction(owl_message *m) { 634 666 switch (m->direction) { … … 644 676 } 645 677 678 int owl_message_parse_direction(char *d) { 679 if(!strcmp(d, "in")) { 680 return OWL_MESSAGE_DIRECTION_IN; 681 } else if(!strcmp(d, "out")) { 682 return OWL_MESSAGE_DIRECTION_OUT; 683 } else { 684 return OWL_MESSAGE_DIRECTION_NONE; 685 } 686 } 687 688 646 689 char *owl_message_get_login(owl_message *m) { 647 690 if (owl_message_is_login(m)) { … … 653 696 } 654 697 } 698 655 699 656 700 char *owl_message_get_header(owl_message *m) {
Note: See TracChangeset
for help on using the changeset viewer.