[Telepathy-commits] [telepathy-doc/master] * docs/examples/list_all_protocols/main.c: Check whether the protocol information has been introspected. Added TODOs wondering how/when to get the information if it has not been introspected.

Murray Cumming (none) murrayc at murrayc-x61
Sun Sep 28 05:51:03 PDT 2008


---
 ChangeLog                               |    5 +++++
 docs/examples/list_all_protocols/main.c |   13 +++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e69de29..d4804bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -0,0 +1,5 @@
+2008-09-26  Murray Cumming  <murrayc at murrayc.com>
+
+	* docs/examples/list_all_protocols/main.c: Check whether the protocol 
+	information has been introspected. Added TODOs wondering how/when to 
+	get the information if it has not been introspected.
diff --git a/docs/examples/list_all_protocols/main.c b/docs/examples/list_all_protocols/main.c
index a7780c2..5f93e63 100644
--- a/docs/examples/list_all_protocols/main.c
+++ b/docs/examples/list_all_protocols/main.c
@@ -61,6 +61,19 @@ on_list_connection_managers(TpConnectionManager * const *connection_manager,
       g_free (cm_name);
       cm_name = NULL;
 
+      //TODO: Usually there is no protocols information available, but sometimes 
+      //there is cached information available. Why?
+      //There is an always-introspect property, but setting that would only cause 
+      //introspection to happen at idle time. How can we request it and wait for it.
+      //The always-introspect documentation also talks about the CM being online.
+      //What does online mean in that context?
+      if (cm->info_source == TP_CM_INFO_SOURCE_LIVE)
+        g_printf("    Introspected protocols information is available.\n");
+      else if (cm->info_source == TP_CM_INFO_SOURCE_FILE)
+        g_printf("    Cached protocols information is available.\n");
+      else
+        g_printf("    No protocols information is available.\n");
+
       //TODO: See http://bugs.freedesktop.org/show_bug.cgi?id=17112
       //about the lack of real API for this:
       if(cm->protocols)
-- 
1.5.6.5




More information about the Telepathy-commits mailing list