Changeset f4d32cd for message.c


Ignore:
Timestamp:
Jan 10, 2007, 3:03:48 PM (14 years ago)
Author:
Nelson Elhage <nelhage@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:
5551208
Parents:
d609dd6
git-author:
Nelson Elhage <nelhage@mit.edu> (01/10/07 15:02:27)
git-committer:
Nelson Elhage <nelhage@mit.edu> (01/10/07 15:03:48)
Message:
Adding infrastructure for admin messages that are questions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • message.c

    r312675c rf4d32cd  
    553553  }
    554554  return(0);
     555}
     556
     557int owl_message_is_question(owl_message *m)
     558{
     559  if(!owl_message_is_type_admin(m)) return 0;
     560  if(owl_message_get_attribute_value(m, "question") != NULL) return 1;
     561  return 0;
     562}
     563
     564int owl_message_is_answered(owl_message *m) {
     565  if(!owl_message_is_question(m)) return 0;
     566  char * q = owl_message_get_attribute_value(m, "question");
     567  if(!q) return 0;
     568  return !strcmp(q, "answered");
     569}
     570
     571void owl_message_set_isanswered(owl_message *m) {
     572  owl_message_set_attribute(m, "question", "answered");
    555573}
    556574
Note: See TracChangeset for help on using the changeset viewer.