[next] telepathy-glib: Move user action time constants to enums.h

Simon McVittie smcv at kemper.freedesktop.org
Wed May 2 08:56:38 PDT 2012


Module: telepathy-glib
Branch: next
Commit: a45808a3a3892f7aadbe71cc746b1653e10bc038
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=a45808a3a3892f7aadbe71cc746b1653e10bc038

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Tue May  1 16:18:21 2012 +0100

Move user action time constants to enums.h

They're numeric, so, close enough...

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49377
Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb at collabora.co.uk>

---

 docs/reference/telepathy-glib-docs.sgml    |    1 -
 docs/reference/telepathy-glib-sections.txt |   10 +-----
 telepathy-glib/defs.h                      |   32 ---------------------
 telepathy-glib/enums.h                     |   25 ++++++++++++++++
 telepathy-glib/extra-gtkdoc.h              |   42 +++++++++++++++++++++++----
 5 files changed, 62 insertions(+), 48 deletions(-)

diff --git a/docs/reference/telepathy-glib-docs.sgml b/docs/reference/telepathy-glib-docs.sgml
index 9549848..8083c82 100644
--- a/docs/reference/telepathy-glib-docs.sgml
+++ b/docs/reference/telepathy-glib-docs.sgml
@@ -22,7 +22,6 @@
   </chapter>
   <chapter id="ch-protocol">
     <title>The Telepathy protocol</title>
-    <xi:include href="xml/defs.xml"/>
     <xi:include href="xml/handle.xml"/>
     <xi:include href="xml/enums.xml"/>
     <xi:include href="xml/errors.xml"/>
diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index f05da64..4d8f9b9 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -15,14 +15,6 @@ TpChannelPrivate
 </SECTION>
 
 <SECTION>
-<INCLUDE>telepathy-glib/defs.h</INCLUDE>
-<FILE>defs</FILE>
-<TITLE>defs</TITLE>
-TP_USER_ACTION_TIME_NOT_USER_ACTION
-TP_USER_ACTION_TIME_CURRENT_TIME
-</SECTION>
-
-<SECTION>
 <INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
 <FILE>base-connection</FILE>
 <TITLE>TpBaseConnection</TITLE>
@@ -2137,6 +2129,8 @@ tp_cm_message_get_type
 <FILE>enums</FILE>
 <INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
 <TITLE>enums</TITLE>
+TP_USER_ACTION_TIME_NOT_USER_ACTION
+TP_USER_ACTION_TIME_CURRENT_TIME
 TpHandleType
 TP_NUM_HANDLE_TYPES
 TpConnMgrParamFlags
diff --git a/telepathy-glib/defs.h b/telepathy-glib/defs.h
index 07adeee..959d143 100644
--- a/telepathy-glib/defs.h
+++ b/telepathy-glib/defs.h
@@ -26,38 +26,6 @@
 
 G_BEGIN_DECLS
 
-/**
- * TP_USER_ACTION_TIME_NOT_USER_ACTION:
- *
- * The "user action time" used by methods like
- * tp_account_channel_request_new() to represent channel requests that are
- * not a result of user action.
- *
- * See also #TpAccountChannelRequest:user-action-time,
- * tp_user_action_time_from_x11(), tp_user_action_time_should_present() and
- * %TP_USER_ACTION_TIME_CURRENT_TIME.
- *
- * Since: 0.11.13
- */
-#define TP_USER_ACTION_TIME_NOT_USER_ACTION (G_GINT64_CONSTANT (0))
-
-/**
- * TP_USER_ACTION_TIME_CURRENT_TIME:
- *
- * The "user action time" used by methods like
- * tp_account_channel_request_new() to represent channel requests that should
- * be treated as though they happened at the current time. This is the same
- * concept as %GDK_CURRENT_TIME in GDK (but note that the numerical value used
- * in Telepathy is not the same).
- *
- * See also #TpAccountChannelRequest:user-action-time,
- * tp_user_action_time_from_x11(), tp_user_action_time_should_present() and
- * %TP_USER_ACTION_TIME_NOT_USER_ACTION.
- *
- * Since: 0.11.13
- */
-#define TP_USER_ACTION_TIME_CURRENT_TIME (G_MAXINT64)
-
 /* telepathy-glib-specific version of G_GNUC_DEPRECATED so our regression
  * tests can continue to test deprecated functionality, while avoiding
  * deprecated bits of other libraries */
diff --git a/telepathy-glib/enums.h b/telepathy-glib/enums.h
index c4c0e2b..d80997c 100644
--- a/telepathy-glib/enums.h
+++ b/telepathy-glib/enums.h
@@ -1,7 +1,32 @@
+/*
+ * enums.h - numeric constants
+ *
+ * Copyright © 2007-2012 Collabora Ltd.
+ * Copyright © 2007-2009 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
 #ifndef __TP_ENUMS_H__
 #define __TP_ENUMS_H__
 
 #include <telepathy-glib/_gen/telepathy-enums.h>
 #include <telepathy-glib/_gen/genums.h>
 
+#define TP_USER_ACTION_TIME_NOT_USER_ACTION (G_GINT64_CONSTANT (0))
+
+#define TP_USER_ACTION_TIME_CURRENT_TIME (G_MAXINT64)
+
 #endif
diff --git a/telepathy-glib/extra-gtkdoc.h b/telepathy-glib/extra-gtkdoc.h
index 1bcf46f..0a1c596 100644
--- a/telepathy-glib/extra-gtkdoc.h
+++ b/telepathy-glib/extra-gtkdoc.h
@@ -1,8 +1,8 @@
 /* This file contains no code - it's just here for gtkdoc to pick up
  * documentation for otherwise undocumented generated files.
  *
- * Copyright (C) 2007 Collabora Ltd.
- * Copyright (C) 2007 Nokia Corporation
+ * Copyright © 2007-2012 Collabora Ltd.
+ * Copyright © 2007-2009 Nokia Corporation
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -20,6 +20,36 @@
  */
 
 /**
+ * TP_USER_ACTION_TIME_NOT_USER_ACTION:
+ *
+ * The "user action time" used by methods like
+ * tp_account_channel_request_new() to represent channel requests that are
+ * not a result of user action.
+ *
+ * See also #TpAccountChannelRequest:user-action-time,
+ * tp_user_action_time_from_x11(), tp_user_action_time_should_present() and
+ * %TP_USER_ACTION_TIME_CURRENT_TIME.
+ *
+ * Since: 0.11.13
+ */
+
+/**
+ * TP_USER_ACTION_TIME_CURRENT_TIME:
+ *
+ * The "user action time" used by methods like
+ * tp_account_channel_request_new() to represent channel requests that should
+ * be treated as though they happened at the current time. This is the same
+ * concept as %GDK_CURRENT_TIME in GDK (but note that the numerical value used
+ * in Telepathy is not the same).
+ *
+ * See also #TpAccountChannelRequest:user-action-time,
+ * tp_user_action_time_from_x11(), tp_user_action_time_should_present() and
+ * %TP_USER_ACTION_TIME_NOT_USER_ACTION.
+ *
+ * Since: 0.11.13
+ */
+
+/**
  * SECTION:svc-generic
  * @title: Generic service-side interfaces
  * @short_description: GInterfaces for D-Bus objects exporting Telepathy
@@ -328,12 +358,10 @@
  * TP_ prefix, e.g. TP_CONNECTION_STATUS_CONNECTED.
  *
  * Each enum also has a constant for the number of members, named like
- * TP_NUM_CONNECTION_STATUSES. The pluralization is currently hard-coded
- * in the conversion scripts, but should move into the specification
- * in future.
+ * TP_NUM_CONNECTION_STATUSES.
  *
- * Constants LAST_TP_CONNECTION_STATUS, etc. are also provided. These are
- * deprecated and will be removed in a future release.
+ * The numeric constants %TP_USER_ACTION_TIME_NOT_USER_ACTION and
+ * %TP_USER_ACTION_TIME_CURRENT_TIME are also provided.
  */
 
 /**



More information about the telepathy-commits mailing list