changeset 17570:8338e171a43b

Fixed naming to adhere to the libpurple convention
author Andreas Monitzer <pidgin@monitzer.com>
date Tue, 12 Jun 2007 00:28:06 +0000
parents a0cd74d7b51e
children 2f23a77eaa04
files libpurple/protocols/jabber/usermood.c libpurple/protocols/jabber/usermood.h
diffstat 2 files changed, 71 insertions(+), 71 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/usermood.c	Tue Jun 12 00:00:53 2007 +0000
+++ b/libpurple/protocols/jabber/usermood.c	Tue Jun 12 00:28:06 2007 +0000
@@ -92,7 +92,7 @@
 static void jabber_mood_cb(JabberStream *js, const char *from, xmlnode *items) {
     /* it doesn't make sense to have more than one item here, so let's just pick the first one */
     xmlnode *item = xmlnode_get_child(items, "item");
-    jabber_mood newmood = unknown;
+    JabberMood newmood = UNKNOWN;
     char *moodtext = NULL;
     JabberBuddy *buddy = jabber_buddy_find(js, from, FALSE);
     /* ignore the mood of people not on our buddy list */
@@ -112,18 +112,18 @@
                         int i;
                         for(i = 0; moodstrings[i]; ++i) {
                             if(!strcmp(moodinfo->name, moodstrings[i])) {
-                                newmood = (jabber_mood)(i+1); /* 0 is "unknown", so we have to add 1 */
+                                newmood = (JabberMood)(i+1); /* 0 is "unknown", so we have to add 1 */
                                 break;
                             }
                         }
                     }
-                    if(newmood != unknown && moodtext != NULL)
+                    if(newmood != UNKNOWN && moodtext != NULL)
                        break;
                 }
             }
         }
     }
-    if(newmood != unknown) {
+    if(newmood != UNKNOWN) {
         JabberBuddyResource *resource = jabber_buddy_find_resource(buddy, NULL);
         const char *status_id = jabber_buddy_state_get_status_id(resource->state);
         
@@ -138,9 +138,9 @@
     jabber_pep_register_handler("moodn", "http://jabber.org/protocol/mood", jabber_mood_cb);
 }
 
-void jabber_set_mood(JabberStream *js, jabber_mood mood, const char *text) {
+void jabber_set_mood(JabberStream *js, JabberMood mood, const char *text) {
     xmlnode *publish, *moodnode;
-    if(mood == unknown)
+    if(mood == UNKNOWN)
         return;
     
     publish = xmlnode_new("publish");
--- a/libpurple/protocols/jabber/usermood.h	Tue Jun 12 00:00:53 2007 +0000
+++ b/libpurple/protocols/jabber/usermood.h	Tue Jun 12 00:28:06 2007 +0000
@@ -26,73 +26,73 @@
 
 /* Implementation of XEP-0107 */
 
-typedef enum _jabber_mood { /* wtf */
-    unknown = 0,
-    afraid,
-    amazed,
-    angry,
-    annoyed,
-    anxious,
-    aroused,
-    ashamed,
-    bored,
-    brave,
-    calm,
-    cold,
-    confused,
-    contented,
-    cranky,
-    curious,
-    depressed,
-    disappointed,
-    disgusted,
-    distracted,
-    embarrassed,
-    excited,
-    flirtatious,
-    frustrated,
-    grumpy,
-    guilty,
-    happy,
-    hot,
-    humbled,
-    humiliated,
-    hungry,
-    hurt,
-    impressed,
-    in_awe,
-    in_love,
-    indignant,
-    interested,
-    intoxicated,
-    invincible,
-    jealous,
-    lonely,
-    mean,
-    moody,
-    nervous,
-    neutral,
-    offended,
-    playful,
-    proud,
-    relieved,
-    remorseful,
-    restless,
-    sad,
-    sarcastic,
-    serious,
-    shocked,
-    shy,
-    sick,
-    sleepy,
-    stressed,
-    surprised,
-    thirsty,
-    worried
-} jabber_mood;
+typedef enum _JabberMood { /* wtf */
+    UNKNOWN = 0,
+    AFRAID,
+    AMAZED,
+    ANGRY,
+    ANNOYED,
+    ANXIOUS,
+    AROUSED,
+    ASHAMED,
+    BORED,
+    BRAVE,
+    CALM,
+    COLD,
+    CONFUSED,
+    CONTENTED,
+    CRANKY,
+    CURIOUS,
+    DEPRESSED,
+    DISAPPOINTED,
+    DISGUSTED,
+    DISTRACTED,
+    EMBARRASSED,
+    EXCITED,
+    FLIRTATIOUS,
+    FRUSTRATED,
+    GRUMPY,
+    GUILTY,
+    HAPPY,
+    HOT,
+    HUMBLED,
+    HUMILIATED,
+    HUNGRY,
+    HURT,
+    IMPRESSED,
+    IN_AWE,
+    IN_LOVE,
+    INDIGNANT,
+    INTERESTED,
+    INTOXICATED,
+    INVINCIBLE,
+    JEALOUS,
+    LONELY,
+    MEAN,
+    MOODY,
+    NERVOUS,
+    NEUTRAL,
+    OFFENDED,
+    PLAYFUL,
+    PROUD,
+    RELIEVED,
+    REMORSEFUL,
+    RESTLESS,
+    SAD,
+    SARCASTIC,
+    SERIOUS,
+    SHOCKED,
+    SHY,
+    SICK,
+    SLEEPY,
+    STRESSED,
+    SURPRISED,
+    THIRSTY,
+    WORRIED
+} JabberMood;
 
 void jabber_mood_init(void);
 
-void jabber_set_mood(JabberStream *js, jabber_mood mood, const char *text /* might be NULL */);
+void jabber_set_mood(JabberStream *js, JabberMood mood, const char *text /* might be NULL */);
 
 #endif /* _PURPLE_JABBER_USERMOOD_H_ */