Mercurial > pidgin.yaz
comparison src/protocols/yahoo/yahoo_friend.c @ 9283:66ff39319900
[gaim-migrate @ 10086]
Just some boring accessor function stuff. Move along folks.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Mon, 14 Jun 2004 16:44:32 +0000 |
parents | fe7db2ea4a1e |
children | fe0291162312 |
comparison
equal
deleted
inserted
replaced
9282:fe7db2ea4a1e | 9283:66ff39319900 |
---|---|
24 #include "prpl.h" | 24 #include "prpl.h" |
25 #include "util.h" | 25 #include "util.h" |
26 | 26 |
27 #include "yahoo_friend.h" | 27 #include "yahoo_friend.h" |
28 | 28 |
29 YahooFriend *yahoo_friend_new(void) | 29 static YahooFriend *yahoo_friend_new(void) |
30 { | 30 { |
31 YahooFriend *ret; | 31 YahooFriend *ret; |
32 | 32 |
33 ret = g_new0(YahooFriend, 1); | 33 ret = g_new0(YahooFriend, 1); |
34 ret->status = YAHOO_STATUS_OFFLINE; | 34 ret->status = YAHOO_STATUS_OFFLINE; |
81 const char *yahoo_friend_get_ip(YahooFriend *f) | 81 const char *yahoo_friend_get_ip(YahooFriend *f) |
82 { | 82 { |
83 return f->ip; | 83 return f->ip; |
84 } | 84 } |
85 | 85 |
86 void yahoo_friend_set_game(YahooFriend *f, const char *game) | |
87 { | |
88 if (f->game) | |
89 g_free(f->game); | |
90 | |
91 if (game) | |
92 f->game = g_strdup(game); | |
93 else | |
94 f->game = NULL; | |
95 } | |
96 | |
97 const char *yahoo_friend_get_game(YahooFriend *f) | |
98 { | |
99 return f->game; | |
100 } | |
101 | |
102 void yahoo_friend_set_status_message(YahooFriend *f, char *msg) | |
103 { | |
104 if (f->msg) | |
105 g_free(f->msg); | |
106 | |
107 f->msg = msg; | |
108 } | |
109 | |
110 const char *yahoo_friend_get_status_message(YahooFriend *f) | |
111 { | |
112 return f->msg; | |
113 } | |
114 | |
86 void yahoo_friend_free(gpointer p) | 115 void yahoo_friend_free(gpointer p) |
87 { | 116 { |
88 YahooFriend *f = p; | 117 YahooFriend *f = p; |
89 if (f->msg) | 118 if (f->msg) |
90 g_free(f->msg); | 119 g_free(f->msg); |