about summary refs log tree commit diff stats
path: root/src/contact.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/contact.c')
-rw-r--r--src/contact.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/contact.c b/src/contact.c
index 2d58308a..3b0d1944 100644
--- a/src/contact.c
+++ b/src/contact.c
@@ -156,6 +156,36 @@ p_contact_subscription(const PContact contact)
     return contact->subscription;
 }
 
+void
+p_contact_set_presence(const PContact contact, const char * const presence)
+{
+    if (contact->presence != NULL) {
+        free(contact->presence);
+        contact->presence = NULL;
+    }
+
+    if (presence == NULL) {
+        contact->presence = NULL;
+    } else {
+        contact->presence = strdup(presence);
+    }
+}
+
+void
+p_contact_set_status(const PContact contact, const char * const status)
+{
+    if (contact->status != NULL) {
+        free(contact->status);
+        contact->status = NULL;
+    }
+
+    if (status == NULL) {
+        contact->status = NULL;
+    } else {
+        contact->status = strdup(status);
+    }
+}
+
 int
 p_contacts_equal_deep(const PContact c1, const PContact c2)
 {
hj5@gmail.com> 2012-09-08 16:51:09 +0100 committer James Booth <boothj5@gmail.com> 2012-09-08 16:51:09 +0100 Check for ncurses headers on cygwin' href='/danisanti/profani-tty/commit/src/preferences.h?id=8e0d8d2a866548a8a21ab016d147e4ae021878cb'>8e0d8d2a ^
aa26278a ^
6d5d41b3 ^
0a42be57 ^
6d5d41b3 ^
e0732ad0 ^

f9b4abe3 ^

46ee72f9 ^
aa26278a ^

54ef09bf ^

8b1653f7 ^

aa26278a ^

6b697054 ^

acb152d4 ^

d91175e5 ^

f4882004 ^

aa26278a ^
6b697054 ^

028a2da3 ^


7344a68f ^



8f0d9511 ^
028a2da3 ^


8f0d9511 ^
9427e644 ^
028a2da3 ^
6d5d41b3 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78