[telepathy-gabble/master] Rename the known list to the stored list

Alban Crequy alban.crequy at collabora.co.uk
Fri May 22 04:03:15 PDT 2009


Signed-off-by: Will Thompson <will.thompson at collabora.co.uk>
---
 src/connection.c                                  |    2 +-
 src/connection.h                                  |    2 +-
 src/roster-channel.c                              |    6 ++--
 src/roster.c                                      |   24 ++++++++++----------
 tests/twisted/roster/groups-12791.py              |    2 +-
 tests/twisted/roster/groups.py                    |    2 +-
 tests/twisted/roster/test-google-roster.py        |    2 +-
 tests/twisted/roster/test-roster-item-deletion.py |    4 +-
 tests/twisted/roster/test-roster.py               |    2 +-
 9 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/src/connection.c b/src/connection.c
index ea783ff..b129ef1 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -539,7 +539,7 @@ static const char *list_handle_strings[] =
 {
     "publish",      /* GABBLE_LIST_HANDLE_PUBLISH */
     "subscribe",    /* GABBLE_LIST_HANDLE_SUBSCRIBE */
-    "known",        /* GABBLE_LIST_HANDLE_KNOWN */
+    "stored",       /* GABBLE_LIST_HANDLE_STORED */
     "deny",         /* GABBLE_LIST_HANDLE_DENY */
     NULL
 };
diff --git a/src/connection.h b/src/connection.h
index f424559..cd060ac 100644
--- a/src/connection.h
+++ b/src/connection.h
@@ -108,7 +108,7 @@ typedef enum
 {
   GABBLE_LIST_HANDLE_PUBLISH = 1,
   GABBLE_LIST_HANDLE_SUBSCRIBE,
-  GABBLE_LIST_HANDLE_KNOWN,
+  GABBLE_LIST_HANDLE_STORED,
   GABBLE_LIST_HANDLE_DENY
 } GabbleListHandle;
 
diff --git a/src/roster-channel.c b/src/roster-channel.c
index 7b8401f..8a5b7f1 100644
--- a/src/roster-channel.c
+++ b/src/roster-channel.c
@@ -169,7 +169,7 @@ gabble_roster_channel_constructor (GType type, guint n_props,
           TP_CHANNEL_GROUP_FLAG_PROPERTIES,
           0);
     }
-  else if (GABBLE_LIST_HANDLE_KNOWN == priv->handle)
+  else if (GABBLE_LIST_HANDLE_STORED == priv->handle)
     {
       tp_group_mixin_change_flags (obj,
           TP_CHANNEL_GROUP_FLAG_CAN_REMOVE |
@@ -588,8 +588,8 @@ _gabble_roster_channel_remove_member_cb (GObject *obj,
       ret = gabble_connection_send_presence (priv->conn,
           LM_MESSAGE_SUB_TYPE_UNSUBSCRIBE, contact_id, message, error);
     }
-  /* known list */
-  else if (GABBLE_LIST_HANDLE_KNOWN == priv->handle)
+  /* stored list */
+  else if (GABBLE_LIST_HANDLE_STORED == priv->handle)
     {
       /* send roster subscription=remove IQ */
       ret = gabble_roster_handle_remove (priv->conn->roster, handle, error);
diff --git a/src/roster.c b/src/roster.c
index b970786..39a7710 100644
--- a/src/roster.c
+++ b/src/roster.c
@@ -1166,7 +1166,7 @@ gabble_roster_iq_cb (LmMessageHandler *handler,
       LmMessageNode *item_node;
       TpIntSet *pub_add, *pub_rem,
                *sub_add, *sub_rem, *sub_rp,
-               *known_add, *known_rem,
+               *stored_add, *stored_rem,
                *deny_add, *deny_rem;
       TpHandleSet *referenced_handles;
       GArray *removed;
@@ -1184,8 +1184,8 @@ gabble_roster_iq_cb (LmMessageHandler *handler,
       sub_add = tp_intset_new ();
       sub_rem = tp_intset_new ();
       sub_rp = tp_intset_new ();
-      known_add = tp_intset_new ();
-      known_rem = tp_intset_new ();
+      stored_add = tp_intset_new ();
+      stored_rem = tp_intset_new ();
       group_update_table = g_hash_table_new_full (NULL, NULL, NULL,
           (GDestroyNotify)_group_mem_update_destroy);
       removed = g_array_new (FALSE, FALSE, sizeof (TpHandle));
@@ -1326,7 +1326,7 @@ gabble_roster_iq_cb (LmMessageHandler *handler,
               g_assert_not_reached ();
             }
 
-          /* handle known list changes */
+          /* handle stored list changes */
           switch (item->subscription)
             {
             case GABBLE_ROSTER_SUBSCRIPTION_NONE:
@@ -1334,15 +1334,15 @@ gabble_roster_iq_cb (LmMessageHandler *handler,
             case GABBLE_ROSTER_SUBSCRIPTION_FROM:
             case GABBLE_ROSTER_SUBSCRIPTION_BOTH:
               if (item->google_type == GOOGLE_ITEM_TYPE_HIDDEN)
-                  tp_intset_add (known_rem, handle);
+                  tp_intset_add (stored_rem, handle);
               else
-                  tp_intset_add (known_add, handle);
+                  tp_intset_add (stored_add, handle);
               break;
             case GABBLE_ROSTER_SUBSCRIPTION_REMOVE:
               if (!tp_handle_set_is_member (sub_chan->group.remote_pending,
                     handle))
                 {
-                  tp_intset_add (known_rem, handle);
+                  tp_intset_add (stored_rem, handle);
                 }
               break;
             default:
@@ -1387,13 +1387,13 @@ gabble_roster_iq_cb (LmMessageHandler *handler,
       tp_group_mixin_change_members ((GObject *) sub_chan,
             "", sub_add, sub_rem, NULL, sub_rp, 0, 0);
 
-      handle = GABBLE_LIST_HANDLE_KNOWN;
+      handle = GABBLE_LIST_HANDLE_STORED;
       chan = _gabble_roster_get_channel (roster, TP_HANDLE_TYPE_LIST, handle,
           NULL, NULL);
 
-      DEBUG ("calling change members on known channel");
+      DEBUG ("calling change members on stored channel");
       tp_group_mixin_change_members ((GObject *) chan,
-            "", known_add, known_rem, NULL, NULL, 0, 0);
+            "", stored_add, stored_rem, NULL, NULL, 0, 0);
 
       DEBUG ("calling change members on any group channels");
       g_hash_table_foreach_remove (group_update_table, _update_group, roster);
@@ -1421,8 +1421,8 @@ gabble_roster_iq_cb (LmMessageHandler *handler,
       tp_intset_destroy (sub_add);
       tp_intset_destroy (sub_rem);
       tp_intset_destroy (sub_rp);
-      tp_intset_destroy (known_add);
-      tp_intset_destroy (known_rem);
+      tp_intset_destroy (stored_add);
+      tp_intset_destroy (stored_rem);
       g_array_free (removed, TRUE);
       g_hash_table_destroy (group_update_table);
       tp_handle_set_destroy (referenced_handles);
diff --git a/tests/twisted/roster/groups-12791.py b/tests/twisted/roster/groups-12791.py
index 6bbe443..a143a6d 100644
--- a/tests/twisted/roster/groups-12791.py
+++ b/tests/twisted/roster/groups-12791.py
@@ -69,7 +69,7 @@ def test(q, bus, conn, stream):
         ['amy at foo.com', 'bob at foo.com'])
     expect_list_channel(q, bus, conn, 'subscribe',
         ['amy at foo.com', 'che at foo.com'])
-    expect_list_channel(q, bus, conn, 'known',
+    expect_list_channel(q, bus, conn, 'stored',
         ['amy at foo.com', 'bob at foo.com', 'che at foo.com'])
     _expect_group_channel(q, bus, conn, 'women', ['amy at foo.com'])
     _expect_group_channel(q, bus, conn, 'affected-by-fdo-12791', [])
diff --git a/tests/twisted/roster/groups.py b/tests/twisted/roster/groups.py
index 8a42bef..d614f38 100644
--- a/tests/twisted/roster/groups.py
+++ b/tests/twisted/roster/groups.py
@@ -39,7 +39,7 @@ def test(q, bus, conn, stream):
         ['amy at foo.com', 'bob at foo.com'])
     expect_list_channel(q, bus, conn, 'subscribe',
         ['amy at foo.com', 'che at foo.com'])
-    expect_list_channel(q, bus, conn, 'known',
+    expect_list_channel(q, bus, conn, 'stored',
         ['amy at foo.com', 'bob at foo.com', 'che at foo.com'])
     expect_group_channel(q, bus, conn, 'women', ['amy at foo.com'])
     expect_group_channel(q, bus, conn, 'men', ['bob at foo.com', 'che at foo.com'])
diff --git a/tests/twisted/roster/test-google-roster.py b/tests/twisted/roster/test-google-roster.py
index 55de3b5..a54712c 100644
--- a/tests/twisted/roster/test-google-roster.py
+++ b/tests/twisted/roster/test-google-roster.py
@@ -108,7 +108,7 @@ def test(q, bus, conn, stream):
 
     event = q.expect('dbus-signal', signal='MembersChanged',
         args=['', [2], [], [], [], 0, 0])
-    assert(event.path.endswith('/known'))
+    assert(event.path.endswith('/stored'))
 
     event = q.expect('dbus-signal', signal='MembersChanged',
         args=['', [], [], [], [2], 0, 0])
diff --git a/tests/twisted/roster/test-roster-item-deletion.py b/tests/twisted/roster/test-roster-item-deletion.py
index ee0e81a..32420ff 100644
--- a/tests/twisted/roster/test-roster-item-deletion.py
+++ b/tests/twisted/roster/test-roster-item-deletion.py
@@ -36,9 +36,9 @@ def test(q, bus, conn, stream):
     # significant
     publish = expect_list_channel(q, bus, conn, 'publish', [])
     subscribe = expect_list_channel(q, bus, conn, 'subscribe', [])
-    known = expect_list_channel(q, bus, conn, 'known', ['quux at foo.com'])
+    stored = expect_list_channel(q, bus, conn, 'stored', ['quux at foo.com'])
 
-    known.Group.RemoveMembers([dbus.UInt32(2)], '')
+    stored.Group.RemoveMembers([dbus.UInt32(2)], '')
     send_roster_iq(stream, 'quux at foo.com', 'remove')
 
     acknowledge_iq(stream, q.expect('stream-iq').stanza)
diff --git a/tests/twisted/roster/test-roster.py b/tests/twisted/roster/test-roster.py
index 75b1904..d464c08 100644
--- a/tests/twisted/roster/test-roster.py
+++ b/tests/twisted/roster/test-roster.py
@@ -35,7 +35,7 @@ def test(q, bus, conn, stream):
         ['amy at foo.com', 'bob at foo.com'])
     expect_list_channel(q, bus, conn, 'subscribe',
         ['amy at foo.com', 'che at foo.com'])
-    expect_list_channel(q, bus, conn, 'known',
+    expect_list_channel(q, bus, conn, 'stored',
         ['amy at foo.com', 'bob at foo.com', 'che at foo.com'])
 
     conn.Disconnect()
-- 
1.5.6.5




More information about the telepathy-commits mailing list