- Timestamp:
- Oct 12, 2017, 8:28:02 PM (7 years ago)
- Branches:
- master
- Children:
- a882637
- Parents:
- ee6b30f
- git-author:
- Anders Kaseorg <andersk@mit.edu> (10/06/17 21:27:09)
- git-committer:
- Anders Kaseorg <andersk@mit.edu> (10/12/17 20:28:02)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
message.c
ree6b30f r4fd3c04 371 371 } 372 372 373 void owl_message_set_type_aim(owl_message *m)374 {375 owl_message_set_attribute(m, "type", "AIM");376 }377 378 373 void owl_message_set_type(owl_message *m, const char* type) 379 374 { … … 395 390 { 396 391 return owl_message_is_type(m, "zephyr"); 397 }398 399 int owl_message_is_type_aim(const owl_message *m)400 {401 return owl_message_is_type(m, "aim");402 392 } 403 393 … … 686 676 } 687 677 688 689 /* if loginout == -1 it's a logout message690 * 0 it's not a login/logout message691 * 1 it's a login message692 */693 void owl_message_create_aim(owl_message *m, const char *sender, const char *recipient, const char *text, int direction, int loginout)694 {695 owl_message_init(m);696 owl_message_set_body(m, text);697 owl_message_set_sender(m, sender);698 owl_message_set_recipient(m, recipient);699 owl_message_set_type_aim(m);700 701 if (direction==OWL_MESSAGE_DIRECTION_IN) {702 owl_message_set_direction_in(m);703 } else if (direction==OWL_MESSAGE_DIRECTION_OUT) {704 owl_message_set_direction_out(m);705 }706 707 /* for now all messages that aren't loginout are private */708 if (!loginout) {709 owl_message_set_isprivate(m);710 }711 712 if (loginout==-1) {713 owl_message_set_islogout(m);714 } else if (loginout==1) {715 owl_message_set_islogin(m);716 }717 }718 678 719 679 void owl_message_create_admin(owl_message *m, const char *header, const char *text)
Note: See TracChangeset
for help on using the changeset viewer.