Changeset 5e202b0 for protocols/jabber/jabber_util.c
- Timestamp:
- 2006-09-23T16:18:24Z (18 years ago)
- Branches:
- master
- Children:
- 172a73f1
- Parents:
- d8e0484
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber_util.c
rd8e0484 r5e202b0 92 92 return node; 93 93 } 94 95 const struct jabber_away_state jabber_away_state_list[] = 96 { 97 { "away", "Away" }, 98 { "chat", "Free for Chat" }, 99 { "dnd", "Do not Disturb" }, 100 { "xa", "Extended Away" }, 101 { "", "Online" }, 102 { "", NULL } 103 }; 104 105 const struct jabber_away_state *jabber_away_state_by_code( char *code ) 106 { 107 int i; 108 109 for( i = 0; jabber_away_state_list[i].full_name; i ++ ) 110 if( g_strcasecmp( jabber_away_state_list[i].code, code ) == 0 ) 111 return jabber_away_state_list + i; 112 113 return NULL; 114 } 115 116 const struct jabber_away_state *jabber_away_state_by_name( char *name ) 117 { 118 int i; 119 120 for( i = 0; jabber_away_state_list[i].full_name; i ++ ) 121 if( g_strcasecmp( jabber_away_state_list[i].full_name, name ) == 0 ) 122 return jabber_away_state_list + i; 123 124 return NULL; 125 }
Note: See TracChangeset
for help on using the changeset viewer.