[libchamplainmm] MapSourceFactory: Wrap missing symbols



commit 7e3bb5ae60b8d639b25314df5927a6339ca3692b
Author: Juan R. GarcĂ­a Blanco <juanrgar gmail com>
Date:   Tue Aug 12 19:12:10 2014 +0200

    MapSourceFactory: Wrap missing symbols
    
        * champlain/src/map-source-factory.hg: Wrap missing symbols;
        remove old ignores.
        * tools/m4/convert_libchamplain.m4: Add conversion from
        'const Glib::RefPtr<MapSourceDesc>&' to
        'ChamplainMapSourceDesc*'.

 champlain/src/map-source-factory.hg |   23 +++++++++++++++--------
 tools/m4/convert_libchamplain.m4    |    1 +
 2 files changed, 16 insertions(+), 8 deletions(-)
---
diff --git a/champlain/src/map-source-factory.hg b/champlain/src/map-source-factory.hg
index 23240cb..190f126 100644
--- a/champlain/src/map-source-factory.hg
+++ b/champlain/src/map-source-factory.hg
@@ -17,12 +17,12 @@
  */
 
 #include <string>
-#include <glibmm.h>
-#include <sigc++/sigc++.h>
+//#include <glibmm.h>
+//#include <sigc++/sigc++.h>
 
 _DEFS(champlainmm,champlain)
 
-#include <champlain/champlain.h>
+//#include <champlain/champlain.h>
 #include <champlainmm/map-source-desc.h>
 #include <champlainmm/map-source.h>
 _PINCLUDE(glibmm/private/object_p.h)
@@ -40,14 +40,21 @@ class MapSourceFactory :
 public:
   _WRAP_METHOD(static Glib::RefPtr<MapSourceFactory> get(),
                champlain_map_source_factory_dup_default, refreturn)
-  _IGNORE(champlain_map_source_factory_get_default)
+  _IGNORE(champlain_map_source_factory_dup_default)
 
-  _IGNORE(champlain_map_source_factory_get_list)
+  _WRAP_METHOD(Glib::RefPtr<MapSource> create(const std::string& id), champlain_map_source_factory_create)
 
-  _WRAP_METHOD(Glib::RefPtr<MapSource> create(const std::string & id),
-               champlain_map_source_factory_create)
+  _WRAP_METHOD(Glib::RefPtr<MapSource> create_cached_source(const std::string& id), 
champlain_map_source_factory_create_cached_source)
+  _WRAP_METHOD(Glib::RefPtr<MapSource> create_memcached_source(const std::string& id), 
champlain_map_source_factory_create_memcached_source)
+  _WRAP_METHOD(Glib::RefPtr<MapSource> create_error_source(guint tile_size), 
champlain_map_source_factory_create_error_source)
 
-  _IGNORE(champlain_map_source_factory_register)
+// Apparently the symbol 'register' conflicts with some other and compilation fails; renamed 'register' to 
'register_desc', and
+// 'get_registered' to 'get_registered_desc'.
+  _WRAP_METHOD(bool register_desc(const Glib::RefPtr<MapSourceDesc>& desc), 
champlain_map_source_factory_register)
+#m4 _CONVERSION(`GSList*',`std::vector< Glib::RefPtr<MapSourceDesc> >',`Glib::SListHandler< 
Glib::RefPtr<MapSourceDesc> >::slist_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
+  _WRAP_METHOD(std::vector< Glib::RefPtr<MapSourceDesc> > get_registered_desc(), 
champlain_map_source_factory_get_registered)
+#m4 _CONVERSION(`GSList*',`std::vector< Glib::RefPtr<const MapSourceDesc> >',`Glib::SListHandler< 
Glib::RefPtr<const MapSourceDesc> >::slist_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
+  _WRAP_METHOD(std::vector< Glib::RefPtr<const MapSourceDesc> > get_registered_desc() const, 
champlain_map_source_factory_get_registered)
 };
 
 } // namespace Champlain
diff --git a/tools/m4/convert_libchamplain.m4 b/tools/m4/convert_libchamplain.m4
index ce76819..b4135a4 100644
--- a/tools/m4/convert_libchamplain.m4
+++ b/tools/m4/convert_libchamplain.m4
@@ -46,6 +46,7 @@ _CONVERSION(`ChamplainMapSource*',`Glib::RefPtr<const MapSource>',`Glib::wrap($3
 _CONVERSION(`const Glib::RefPtr<MapSource>&',`ChamplainMapSource*',__CONVERT_REFPTR_TO_P)
 
 # MapSourceDesc
+_CONVERSION(`const Glib::RefPtr<MapSourceDesc>&',`ChamplainMapSourceDesc*',__CONVERT_REFPTR_TO_P)
 _CONVERSION(`ChamplainMapSourceDesc*',`Glib::RefPtr<MapSourceDesc>',`Glib::wrap($3)')
 _CONVERSION(`GSList*',`Glib::SListHandle<const MapSourceDesc *>',__FL2H_SHALLOW)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]