From c7175e004a59f5b6a902d5be5df1b05804bf3d5a Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 31 Oct 2013 15:01:56 +0000 Subject: [PATCH 15/17] Sync tools from telepathy-glib next --- tools/doc-generator.xsl | 2 +- tools/glib-client-gen.py | 6 ------ tools/glib-ginterface-gen.py | 3 --- tools/glib-interfaces-gen.py | 26 +++++++++++++------------- 4 files changed, 14 insertions(+), 23 deletions(-) diff --git a/tools/doc-generator.xsl b/tools/doc-generator.xsl index 90090d2..76fc969 100644 --- a/tools/doc-generator.xsl +++ b/tools/doc-generator.xsl @@ -276,7 +276,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Telepathy Properties:

Accessed using the - Telepathy + Telepathy Properties interface.

diff --git a/tools/glib-client-gen.py b/tools/glib-client-gen.py index 7b3c67d..a8a96cb 100644 --- a/tools/glib-client-gen.py +++ b/tools/glib-client-gen.py @@ -1212,9 +1212,6 @@ class Generator(object): assert len(ifaces) == 1 iface = ifaces[0] name = node.getAttribute('name').replace('/', '') - # This is a hack to get rid of interface version numbers - # until we migrate to generating version-numbered code - name = name.replace('Call1_', 'Call_').rstrip('1') self.iface = name self.iface_lc = name.lower() @@ -1315,9 +1312,6 @@ class Generator(object): if not signals: continue name = node.getAttribute('name').replace('/', '').lower() - # This is a hack to get rid of interface version numbers - # until we migrate to generating version-numbered code - name = name.replace('call1_', 'call_').rstrip('1') self.iface_uc = name.upper() self.b(' if (quark == %s)' % self.get_iface_quark()) self.b(' %s_add_signals_for_%s (proxy);' diff --git a/tools/glib-ginterface-gen.py b/tools/glib-ginterface-gen.py index edca4a3..6ef9f4a 100644 --- a/tools/glib-ginterface-gen.py +++ b/tools/glib-ginterface-gen.py @@ -96,9 +96,6 @@ class Generator(object): def do_node(self, node): node_name = node.getAttribute('name').replace('/', '') - # This is a hack to get rid of interface version numbers - # until we migrate to generating version-numbered code - node_name = node_name.replace('Call1_', 'Call_').rstrip('1') node_name_mixed = self.node_name_mixed = node_name.replace('_', '') node_name_lc = self.node_name_lc = node_name.lower() node_name_uc = self.node_name_uc = node_name.upper() diff --git a/tools/glib-interfaces-gen.py b/tools/glib-interfaces-gen.py index 47f4c08..b67d7b4 100644 --- a/tools/glib-interfaces-gen.py +++ b/tools/glib-interfaces-gen.py @@ -75,14 +75,14 @@ class Generator(object): * The interface name "%(name)s" */ """ % {'IFACE_DEFINE' : (self.prefix + 'IFACE_' + \ - parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'), + parent_name).upper().replace('/', ''), 'name' : iface.getAttribute('name')}) self.h(""" #define %(IFACE_DEFINE)s \\ "%(name)s" """ % {'IFACE_DEFINE' : (self.prefix + 'IFACE_' + \ - parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'), + parent_name).upper().replace('/', ''), 'name' : iface.getAttribute('name')}) self.d(""" @@ -93,9 +93,9 @@ class Generator(object): name "%(name)s" */ """ % {'IFACE_QUARK_DEFINE' : (self.prefix + 'IFACE_QUARK_' + \ - parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'), + parent_name).upper().replace('/', ''), 'iface_quark_func' : (self.prefix + 'iface_quark_' + \ - parent_name).lower().replace('/', '').replace('call1_', 'call_').rstrip('1'), + parent_name).lower().replace('/', ''), 'name' : iface.getAttribute('name')}) self.h(""" @@ -105,9 +105,9 @@ name "%(name)s" GQuark %(iface_quark_func)s (void); """ % {'IFACE_QUARK_DEFINE' : (self.prefix + 'IFACE_QUARK_' + \ - parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'), + parent_name).upper().replace('/', ''), 'iface_quark_func' : (self.prefix + 'iface_quark_' + \ - parent_name).lower().replace('/', '').replace('call1_', 'call_').rstrip('1'), + parent_name).lower().replace('/', ''), 'name' : iface.getAttribute('name')}) self.c("""\ @@ -125,7 +125,7 @@ GQuark } """ % {'iface_quark_func' : (self.prefix + 'iface_quark_' + \ - parent_name).lower().replace('/', '').replace('call1_', 'call_').rstrip('1'), + parent_name).lower().replace('/', ''), 'name' : iface.getAttribute('name')}) for prop in iface.getElementsByTagNameNS(None, 'property'): @@ -136,7 +136,7 @@ GQuark * The fully-qualified property name "%(name)s.%(prop)s" */ """ % {'IFACE_PREFIX' : (self.prefix + 'PROP_' + \ - parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'), + parent_name).upper().replace('/', ''), 'PROP_UC': prop.getAttributeNS(NS_TP, "name-for-bindings").upper(), 'name' : iface.getAttribute('name'), 'prop' : prop.getAttribute('name'), @@ -146,7 +146,7 @@ GQuark #define %(IFACE_PREFIX)s_%(PROP_UC)s \\ "%(name)s.%(prop)s" """ % {'IFACE_PREFIX' : (self.prefix + 'PROP_' + \ - parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'), + parent_name).upper().replace('/', ''), 'PROP_UC': prop.getAttributeNS(NS_TP, "name-for-bindings").upper(), 'name' : iface.getAttribute('name'), 'prop' : prop.getAttribute('name'), @@ -161,7 +161,7 @@ GQuark * The fully-qualified contact attribute token name "%(name)s/%(prop)s" */ """ % {'TOKEN_PREFIX' : (self.prefix + 'TOKEN_' + \ - parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'), + parent_name).upper().replace('/', ''), 'TOKEN_UC': prop.getAttributeNS(None, "name").upper().replace("-", "_").replace(".", "_"), 'name' : iface.getAttribute('name'), 'prop' : prop.getAttribute('name'), @@ -171,7 +171,7 @@ GQuark #define %(TOKEN_PREFIX)s_%(TOKEN_UC)s \\ "%(name)s/%(prop)s" """ % {'TOKEN_PREFIX' : (self.prefix + 'TOKEN_' + \ - parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'), + parent_name).upper().replace('/', ''), 'TOKEN_UC': prop.getAttributeNS(None, "name").upper().replace("-", "_").replace(".", "_"), 'name' : iface.getAttribute('name'), 'prop' : prop.getAttribute('name'), @@ -186,7 +186,7 @@ GQuark * The fully-qualified capability token name "%(name)s/%(prop)s" */ """ % {'TOKEN_PREFIX' : (self.prefix + 'TOKEN_' + \ - parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'), + parent_name).upper().replace('/', ''), 'TOKEN_UC': prop.getAttributeNS(None, "name").upper().replace("-", "_").replace(".", "_"), 'name' : iface.getAttribute('name'), 'prop' : prop.getAttribute('name'), @@ -196,7 +196,7 @@ GQuark #define %(TOKEN_PREFIX)s_%(TOKEN_UC)s \\ "%(name)s/%(prop)s" """ % {'TOKEN_PREFIX' : (self.prefix + 'TOKEN_' + \ - parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'), + parent_name).upper().replace('/', ''), 'TOKEN_UC': prop.getAttributeNS(None, "name").upper().replace("-", "_").replace(".", "_"), 'name' : iface.getAttribute('name'), 'prop' : prop.getAttribute('name'), -- 1.8.4.rc3