[niepce] replace the utils namespace by the fwk namespace



commit 14cdeb0aec95fe1f4fedeec9c29ab9c82ee49049
Author: Hubert Figuiere <hub figuiere net>
Date:   Sun May 10 00:46:12 2009 -0400

    replace the utils namespace by the fwk namespace
---
 src/engine/db/filebundle.cpp                   |    6 +-
 src/engine/db/filebundle.hpp                   |    2 +-
 src/engine/db/libfile.cpp                      |    2 +-
 src/engine/db/libmetadata.cpp                  |    2 +-
 src/engine/db/libmetadata.hpp                  |    2 +-
 src/engine/db/library.cpp                      |   54 ++++++++++++------------
 src/engine/db/test_filebundle.cpp              |    2 +-
 src/engine/library/commands.cpp                |    4 +-
 src/engine/library/commands.hpp                |    2 +-
 src/engine/library/opqueue.hpp                 |    2 +-
 src/engine/library/thumbnailcache.cpp          |    2 +-
 src/engine/library/thumbnailcache.hpp          |    2 +-
 src/fwk/Makefile.am                            |   21 +++++++++-
 src/fwk/{utils => base}/autoflag.hpp           |   10 ++--
 src/fwk/{utils => base}/debug.cpp              |    9 +---
 src/fwk/{utils => base}/debug.hpp              |   16 ++++----
 src/fwk/{utils => base}/fractions.cpp          |    2 +-
 src/fwk/{utils => base}/fractions.hpp          |    2 +-
 src/fwk/{utils => base}/geometry.cpp           |    6 +-
 src/fwk/{utils => base}/geometry.hpp           |    8 ++--
 src/fwk/{utils => base}/moniker.cpp            |    8 ++--
 src/fwk/{utils => base}/moniker.hpp            |   10 ++--
 src/fwk/{utils => base/t}/testgeometry.cpp     |    5 +-
 src/fwk/{utils => base/t}/testmoniker.cpp      |    4 +-
 src/fwk/toolkit/application.cpp                |    2 +-
 src/fwk/toolkit/configdatabinder.hpp           |    2 +-
 src/fwk/toolkit/configuration.cpp              |    2 +-
 src/fwk/toolkit/controller.cpp                 |    2 +-
 src/fwk/toolkit/frame.cpp                      |    8 ++--
 src/fwk/toolkit/metadatawidget.cpp             |    8 ++--
 src/fwk/toolkit/metadatawidget.hpp             |    7 +--
 src/fwk/toolkit/mimetype.cpp                   |    2 +-
 src/fwk/toolkit/notificationcenter.cpp         |    2 +-
 src/fwk/toolkit/undo.cpp                       |    2 +-
 src/fwk/toolkit/widgets/editablehscale.cpp     |    2 +-
 src/fwk/utils/Makefile.am                      |   23 ++++------
 src/fwk/utils/boost.hpp                        |    4 +-
 src/fwk/utils/buffer.hpp                       |    2 +-
 src/fwk/utils/databinder.cpp                   |    2 +-
 src/fwk/utils/db/iconnectiondriver.hpp         |    6 +-
 src/fwk/utils/db/sqlite/sqlitecnxdrv.cpp       |    8 ++--
 src/fwk/utils/db/sqlite/sqlitecnxdrv.hpp       |    4 +-
 src/fwk/utils/db/sqlstatement.cpp              |    2 +-
 src/fwk/utils/db/sqlstatement.hpp              |    2 +-
 src/fwk/utils/db/test_db.cpp                   |    2 +-
 src/fwk/utils/db/test_db2.cpp                  |    2 +-
 src/fwk/utils/db/test_db3.cpp                  |    6 +-
 src/fwk/utils/db/test_db4.cpp                  |    2 +-
 src/fwk/utils/exception.cpp                    |    2 +-
 src/fwk/utils/exception.hpp                    |    8 ++--
 src/fwk/utils/exempi.cpp                       |    4 +-
 src/fwk/utils/exempi.hpp                       |    2 +-
 src/fwk/utils/files.cpp                        |    6 +-
 src/fwk/utils/files.hpp                        |    4 +-
 src/fwk/utils/fsutils.cpp                      |    4 +-
 src/fwk/utils/fsutils.hpp                      |    4 +-
 src/fwk/utils/logstreamutils.hpp               |    2 +-
 src/fwk/utils/mtqueue.hpp                      |    8 ++--
 src/fwk/utils/stringutils.hpp                  |    4 +-
 src/fwk/utils/testfiles.cpp                    |    6 +-
 src/fwk/utils/teststringutils.cpp              |    2 +-
 src/fwk/utils/testufrawmeta.cpp                |    6 +-
 src/fwk/utils/testxmp.cpp                      |    4 +-
 src/fwk/utils/thread.cpp                       |    6 +-
 src/fwk/utils/thread.hpp                       |   10 ++--
 src/fwk/utils/ufrawmeta.cpp                    |    6 +-
 src/fwk/utils/ufrawmeta.hpp                    |    4 +-
 src/fwk/utils/worker.hpp                       |   10 ++--
 src/libraryclient/clientimpl.cpp               |   10 ++--
 src/libraryclient/clientimpl.hpp               |    8 ++--
 src/libraryclient/libraryclient.cpp            |    4 +-
 src/libraryclient/libraryclient.hpp            |    7 +--
 src/libraryclient/locallibraryserver.hpp       |    4 +-
 src/libraryclient/test_worker.cpp              |    2 +-
 src/ncr/image.cpp                              |    2 +-
 src/niepce/Makefile.am                         |    2 +-
 src/niepce/main.cpp                            |    5 +--
 src/niepce/modules/darkroom/darkroommodule.cpp |    2 +-
 src/niepce/modules/darkroom/imagecanvas.cpp    |   10 ++--
 src/niepce/stock.cpp                           |    2 +-
 src/niepce/ui/dialogs/editlabels.cpp           |    2 +-
 src/niepce/ui/dialogs/importdialog.cpp         |    2 +-
 src/niepce/ui/filmstripcontroller.cpp          |    2 +-
 src/niepce/ui/imageliststore.cpp               |    2 +-
 src/niepce/ui/librarycellrenderer.cpp          |    2 +-
 src/niepce/ui/librarymainview.cpp              |    2 +-
 src/niepce/ui/librarymainviewcontroller.cpp    |    2 +-
 src/niepce/ui/metadatapanecontroller.cpp       |    4 +-
 src/niepce/ui/metadatapanecontroller.hpp       |    2 +-
 src/niepce/ui/niepcewindow.cpp                 |    6 +-
 src/niepce/ui/selectioncontroller.cpp          |   10 ++--
 src/niepce/ui/workspacecontroller.cpp          |    2 +-
 src/niepce/xmp.cpp                             |    3 +-
 src/niepce/xmp.hpp                             |    2 +-
 94 files changed, 247 insertions(+), 243 deletions(-)

diff --git a/src/engine/db/filebundle.cpp b/src/engine/db/filebundle.cpp
index fb3a937..b4ec675 100644
--- a/src/engine/db/filebundle.cpp
+++ b/src/engine/db/filebundle.cpp
@@ -19,7 +19,7 @@
 
 
 #include "filebundle.hpp"
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "fwk/utils/pathutils.hpp"
 #include "fwk/toolkit/mimetype.hpp"
 
@@ -58,7 +58,7 @@ FileBundle::add(const std::string & path)
 
 
 FileBundle::ListPtr 
-FileBundle::filter_bundles(const utils::FileList::Ptr & files)
+FileBundle::filter_bundles(const fwk::FileList::Ptr & files)
 {
     FileBundle::ListPtr bundles(new FileBundle::List());
     FileBundle::Ptr current_bundle;
@@ -66,7 +66,7 @@ FileBundle::filter_bundles(const utils::FileList::Ptr & files)
 
     files->sort();
 
-    for(utils::FileList::const_iterator iter = files->begin();
+    for(fwk::FileList::const_iterator iter = files->begin();
         iter != files->end(); ++iter)
     {
         std::string basename = fwk::path_stem(*iter);
diff --git a/src/engine/db/filebundle.hpp b/src/engine/db/filebundle.hpp
index aabced1..0192c61 100644
--- a/src/engine/db/filebundle.hpp
+++ b/src/engine/db/filebundle.hpp
@@ -46,7 +46,7 @@ public:
     const std::string & sidecar() const
         { return m_xmp_sidecar; }
     
-    static ListPtr filter_bundles(const utils::FileList::Ptr & files);
+    static ListPtr filter_bundles(const fwk::FileList::Ptr & files);
 private:
     std::string m_main;
     std::string m_xmp_sidecar;
diff --git a/src/engine/db/libfile.cpp b/src/engine/db/libfile.cpp
index a62cb45..5f23da2 100644
--- a/src/engine/db/libfile.cpp
+++ b/src/engine/db/libfile.cpp
@@ -18,7 +18,7 @@
  */
 
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "libfile.hpp"
 #include "metadata.hpp"
 
diff --git a/src/engine/db/libmetadata.cpp b/src/engine/db/libmetadata.cpp
index a806b9f..36eec49 100644
--- a/src/engine/db/libmetadata.cpp
+++ b/src/engine/db/libmetadata.cpp
@@ -21,7 +21,7 @@
 #include <time.h>
 #include <exempi/xmpconsts.h>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "libmetadata.hpp"
 
 namespace db {
diff --git a/src/engine/db/libmetadata.hpp b/src/engine/db/libmetadata.hpp
index c477119..5155842 100644
--- a/src/engine/db/libmetadata.hpp
+++ b/src/engine/db/libmetadata.hpp
@@ -31,7 +31,7 @@
 namespace db {
 
 	class LibMetadata
-		: public utils::XmpMeta
+		: public fwk::XmpMeta
 	{
 	public:
 		typedef std::tr1::shared_ptr<LibMetadata> Ptr;
diff --git a/src/engine/db/library.cpp b/src/engine/db/library.cpp
index a913795..87f7006 100644
--- a/src/engine/db/library.cpp
+++ b/src/engine/db/library.cpp
@@ -31,7 +31,7 @@
 #include "metadata.hpp"
 #include "fwk/utils/exception.hpp"
 #include "fwk/utils/exempi.hpp"
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "fwk/utils/pathutils.hpp"
 #include "fwk/utils/db/sqlite/sqlitecnxmgrdrv.hpp"
 #include "fwk/utils/db/sqlite/sqlitecnxdrv.hpp"
@@ -197,7 +197,7 @@ int Library::checkDatabaseVersion()
             }
         }
     }
-    catch(const utils::Exception & e)
+    catch(const fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
         v = -1;
@@ -244,7 +244,7 @@ std::string Library::getFsFile(int id)
             p = path;
         }
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -263,7 +263,7 @@ int Library::addFile(int folder_id, const std::string & file, bool manage)
         std::string label;  
         fwk::MimeType mime = fwk::MimeType(file);
         db::LibFile::FileType file_type = db::LibFile::mimetype_to_filetype(mime);
-        utils::XmpMeta meta(file, file_type == db::LibFile::FILE_TYPE_RAW);
+        fwk::XmpMeta meta(file, file_type == db::LibFile::FILE_TYPE_RAW);
         label_id = 0;
         orientation = meta.orientation();
         rating = meta.rating();
@@ -275,7 +275,7 @@ int Library::addFile(int folder_id, const std::string & file, bool manage)
 
         int fs_file_id = addFsFile(file);
         if(fs_file_id <= 0) {
-            throw(utils::Exception("add fsfile failed"));
+            throw(fwk::Exception("add fsfile failed"));
         }
         SQLStatement sql(boost::format("INSERT INTO files ("
                                        " main_file, name, parent_id, "
@@ -309,7 +309,7 @@ int Library::addFile(int folder_id, const std::string & file, bool manage)
             }
         }
     }
-    catch(const utils::Exception & e)
+    catch(const fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
         ret = -1;
@@ -368,7 +368,7 @@ bool Library::addSidecarFileToBundle(int file_id, int fsfile_id)
     try {
         return m_dbdrv->execute_statement(sql);
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -385,7 +385,7 @@ bool Library::addJpegFileToBundle(int file_id, int fsfile_id)
     try {
         return m_dbdrv->execute_statement(sql);
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -411,7 +411,7 @@ LibFolder::Ptr Library::getFolder(const std::string & folder)
             }
         }
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -434,7 +434,7 @@ LibFolder::Ptr Library::addFolder(const std::string & folder)
                                              fwk::path_basename(folder)));
         }
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -456,7 +456,7 @@ void Library::getAllFolders(const LibFolder::ListPtr & l)
             }
         }
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -512,7 +512,7 @@ void Library::getFolderContent(int folder_id, const LibFile::ListPtr & fl)
             }
         }
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -530,7 +530,7 @@ int Library::countFolder(int folder_id)
             }
         }			
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -551,7 +551,7 @@ void Library::getAllKeywords(const Keyword::ListPtr & l)
             }
         }
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -570,7 +570,7 @@ int Library::makeKeyword(const std::string & keyword)
             }
         }
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -585,7 +585,7 @@ int Library::makeKeyword(const std::string & keyword)
                 notify(NOTIFY_ADDED_KEYWORD, boost::any(kw));
             }
         }
-        catch(utils::Exception & e)
+        catch(fwk::Exception & e)
         {
             DBG_OUT("db exception %s", e.what());
         }
@@ -604,7 +604,7 @@ bool Library::assignKeyword(int kw_id, int file_id)
     try {
         ret = m_dbdrv->execute_statement(sql);
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -631,7 +631,7 @@ void Library::getKeywordContent(int keyword_id, const LibFile::ListPtr & fl)
             }
         }
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -652,7 +652,7 @@ void Library::getMetaData(int file_id, const LibMetadata::Ptr & meta)
             }
         }
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -672,7 +672,7 @@ bool Library::setInternalMetaDataInt(int file_id, const char* col,
     try {
         ret = m_dbdrv->execute_statement(sql);
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
         ret = false;
@@ -695,7 +695,7 @@ bool Library::setMetaData(int file_id, const LibMetadata::Ptr & meta)
     try {
         ret = m_dbdrv->execute_statement(sql);
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
         ret = false;
@@ -769,7 +769,7 @@ void Library::getAllLabels(const Label::ListPtr & l)
             }
         }
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -806,7 +806,7 @@ bool Library::updateLabel(int label_id, const std::string & name, const std::str
     try {
         return m_dbdrv->execute_statement(sql);
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -822,7 +822,7 @@ bool Library::deleteLabel(int label_id)
     try {
         return m_dbdrv->execute_statement(sql);
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
     }
@@ -842,7 +842,7 @@ bool Library::getXmpIdsInQueue(std::vector<int> & ids)
             }
         }
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
         return false;
@@ -884,7 +884,7 @@ bool Library::rewriteXmpForId(int id)
                     // TODO backup
                 }
                 // TODO probably a faster way to do that
-                utils::XmpMeta xmppacket;
+                fwk::XmpMeta xmppacket;
                 xmppacket.unserialize(xmp_buffer.c_str());
                 // TODO use different API
                 FILE * f = fopen(p.c_str(), "w");
@@ -905,7 +905,7 @@ bool Library::rewriteXmpForId(int id)
             }
         }
     }
-    catch(utils::Exception & e)
+    catch(fwk::Exception & e)
     {
         DBG_OUT("db exception %s", e.what());
         return false;
diff --git a/src/engine/db/test_filebundle.cpp b/src/engine/db/test_filebundle.cpp
index 408dac6..36c562d 100644
--- a/src/engine/db/test_filebundle.cpp
+++ b/src/engine/db/test_filebundle.cpp
@@ -31,7 +31,7 @@ int test_main(int, char *[])
 {
     fwk::utils::init();
 
-    utils::FileList::Ptr thelist(new utils::FileList());
+    fwk::FileList::Ptr thelist(new fwk::FileList());
     
     thelist->push_back("/foo/bar/img_0001.cr2");
     thelist->push_back("/foo/bar/img_0001.jpg");
diff --git a/src/engine/library/commands.cpp b/src/engine/library/commands.cpp
index 938af4f..326f072 100644
--- a/src/engine/library/commands.cpp
+++ b/src/engine/library/commands.cpp
@@ -25,7 +25,7 @@
 
 
 #include "fwk/utils/boost.hpp"
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "engine/db/library.hpp"
 #include "engine/db/libfolder.hpp"
 #include "engine/db/libfile.hpp"
@@ -40,7 +40,7 @@ using db::LibFolder;
 using db::LibFile;
 using db::LibMetadata;
 using db::Keyword;
-using utils::FileList;
+using fwk::FileList;
 
 namespace library {
 
diff --git a/src/engine/library/commands.hpp b/src/engine/library/commands.hpp
index 4010c7e..5712c61 100644
--- a/src/engine/library/commands.hpp
+++ b/src/engine/library/commands.hpp
@@ -41,7 +41,7 @@ public:
 		static void cmdListAllKeywords(const db::Library::Ptr & lib);
 		static void cmdImportFiles(const db::Library::Ptr & lib, 
                                const std::string & folder, 
-                               const utils::FileList::Ptr & files, 
+                               const fwk::FileList::Ptr & files, 
                                bool manage);
 		static void cmdQueryFolderContent(const db::Library::Ptr & lib, 
                                       int folder_id);
diff --git a/src/engine/library/opqueue.hpp b/src/engine/library/opqueue.hpp
index de6c134..79d3bea 100644
--- a/src/engine/library/opqueue.hpp
+++ b/src/engine/library/opqueue.hpp
@@ -28,7 +28,7 @@
 
 namespace library {
 
-	typedef utils::MtQueue< Op::Ptr > OpQueue;
+	typedef fwk::MtQueue< Op::Ptr > OpQueue;
 
 }
 
diff --git a/src/engine/library/thumbnailcache.cpp b/src/engine/library/thumbnailcache.cpp
index ff49c10..f77b8cf 100644
--- a/src/engine/library/thumbnailcache.cpp
+++ b/src/engine/library/thumbnailcache.cpp
@@ -27,7 +27,7 @@
 #include <libopenraw-gnome/gdkpixbuf.h>
 
 #include "niepce/notifications.hpp"
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "fwk/toolkit/mimetype.hpp"
 #include "fwk/toolkit/gdkutils.hpp"
 #include "thumbnailcache.hpp"
diff --git a/src/engine/library/thumbnailcache.hpp b/src/engine/library/thumbnailcache.hpp
index 354d254..8d18906 100644
--- a/src/engine/library/thumbnailcache.hpp
+++ b/src/engine/library/thumbnailcache.hpp
@@ -53,7 +53,7 @@ namespace library {
 
 
 	class ThumbnailCache
-		: private utils::Worker< ThumbnailTask::Ptr >
+		: private fwk::Worker< ThumbnailTask::Ptr >
 	{
 	public:
 		ThumbnailCache(const std::string & dir,
diff --git a/src/fwk/Makefile.am b/src/fwk/Makefile.am
index d3d2f1b..077b96d 100644
--- a/src/fwk/Makefile.am
+++ b/src/fwk/Makefile.am
@@ -6,4 +6,23 @@ INCLUDES = -I$(top_srcdir)/src
 noinst_LIBRARIES = libfwk.a
 
 
-libfwk_a_SOURCES = base/color.hpp base/color.cpp
\ No newline at end of file
+TESTS = testmoniker testgeometry
+
+check_PROGRAMS = testmoniker testgeometry
+
+testmoniker_SOURCES = base/t/testmoniker.cpp
+testmoniker_LDADD = libfwk.a \
+	@LIBGLIBMM_LIBS@
+
+testgeometry_SOURCES = base/t/testgeometry.cpp
+testgeometry_LDADD = libfwk.a \
+	@LIBGLIBMM_LIBS@
+
+
+libfwk_a_SOURCES = base/color.hpp base/color.cpp \
+	base/autoflag.hpp \
+	base/debug.hpp base/debug.cpp \
+	base/fractions.hpp base/fractions.cpp \
+	base/moniker.hpp base/moniker.cpp \
+	base/geometry.hpp base/geometry.cpp \
+	$(NULL)
\ No newline at end of file
diff --git a/src/fwk/utils/autoflag.hpp b/src/fwk/base/autoflag.hpp
similarity index 84%
rename from src/fwk/utils/autoflag.hpp
rename to src/fwk/base/autoflag.hpp
index 80952e2..986bdf4 100644
--- a/src/fwk/utils/autoflag.hpp
+++ b/src/fwk/base/autoflag.hpp
@@ -1,7 +1,7 @@
 /*
- * niepce - utils/autoflag.h
+ * niepce - fwk/base/autoflag.hpp
  *
- * Copyright (C) 2008 Hubert Figuiere
+ * Copyright (C) 2008-2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -18,10 +18,10 @@
  */
 
 
-#ifndef _UTILS_AUTOFLAG_H_
-#define _UTILS_AUTOFLAG_H_
+#ifndef _FWK_BASE_AUTOFLAG_HPP_
+#define _FWK_BASE_AUTOFLAG_HPP_
 
-namespace utils {
+namespace fwk {
 
 class AutoFlag
 {
diff --git a/src/fwk/utils/debug.cpp b/src/fwk/base/debug.cpp
similarity index 93%
rename from src/fwk/utils/debug.cpp
rename to src/fwk/base/debug.cpp
index 7dd34e7..761127c 100644
--- a/src/fwk/utils/debug.cpp
+++ b/src/fwk/base/debug.cpp
@@ -1,7 +1,7 @@
 /*
- * niepce - utils/debug.cpp
+ * niepce - fwk/base/debug.cpp
  *
- * Copyright (C) 2007 Hubert Figuiere
+ * Copyright (C) 2007-2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -34,13 +34,12 @@
 #define NDEBUG _SAVENDEBUG
 #endif
 
-#include <glibmm/thread.h>
 
 #include "debug.hpp"
 
 
 
-namespace utils {
+namespace fwk {
 
 	static void _vprint(const char *prefix, const char *fmt, 
 										 const char* func,	va_list marker);
@@ -107,8 +106,6 @@ namespace utils {
 	static void _vprint(const char *prefix, const char *fmt, 
 							const char* func,	va_list marker)
 	{
-		static Glib::RecMutex mutex;
-    Glib::RecMutex::Lock lock(mutex);
 		char buf[128];
 		snprintf(buf, 128, "(%d) ", (int)pthread_self());
 		fwrite(buf, 1, strlen(buf), stderr);
diff --git a/src/fwk/utils/debug.hpp b/src/fwk/base/debug.hpp
similarity index 85%
rename from src/fwk/utils/debug.hpp
rename to src/fwk/base/debug.hpp
index e750da8..b622c50 100644
--- a/src/fwk/utils/debug.hpp
+++ b/src/fwk/base/debug.hpp
@@ -1,7 +1,7 @@
 /*
- * niepce - utils/debug.h
+ * niepce - fwk/base/debug.h
  *
- * Copyright (C) 2007 Hubert Figuiere
+ * Copyright (C) 2007-2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -17,8 +17,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef __UTILS_DEBUG_H__
-#define __UTILS_DEBUG_H__
+#ifndef __FWK_BASE_DEBUG_H__
+#define __FWK_BASE_DEBUG_H__
 
 #ifdef __GNUC__
 // we have too mark this as a system header because otherwise GCC barfs 
@@ -26,25 +26,25 @@
 #pragma GCC system_header
 #endif
 
-namespace utils {
+namespace fwk {
 
 #ifdef DEBUG
 #define DBG_OUT(x, ...) \
-	utils::dbg_print(x,  __FUNCTION__, ## __VA_ARGS__)
+	fwk::dbg_print(x,  __FUNCTION__, ## __VA_ARGS__)
 #else
 #define DBG_OUT(x, ...) 	
 #endif
 
 #ifdef DEBUG
 #define DBG_ASSERT(cond, reason)	\
-	utils::dbg_assert(cond, #cond, __FILE__, __LINE__, reason)
+	fwk::dbg_assert(cond, #cond, __FILE__, __LINE__, reason)
 #else
 #define DBG_ASSERT(cond, reason)	\
 	assert(cond)
 #endif
 
 #define ERR_OUT(x, ...) \
-	utils::err_print(x,  __FUNCTION__, ## __VA_ARGS__)
+	fwk::err_print(x,  __FUNCTION__, ## __VA_ARGS__)
 
 
 	/** print debug messages. printf format.
diff --git a/src/fwk/utils/fractions.cpp b/src/fwk/base/fractions.cpp
similarity index 97%
rename from src/fwk/utils/fractions.cpp
rename to src/fwk/base/fractions.cpp
index 10bdfd5..4826d70 100644
--- a/src/fwk/utils/fractions.cpp
+++ b/src/fwk/base/fractions.cpp
@@ -1,5 +1,5 @@
 /*
- * niepce - fwk/utils/fractions.hpp
+ * niepce - fwk/base/fractions.cpp
  *
  * Copyright (C) 2008-2009 Hubert Figuiere
  *
diff --git a/src/fwk/utils/fractions.hpp b/src/fwk/base/fractions.hpp
similarity index 96%
rename from src/fwk/utils/fractions.hpp
rename to src/fwk/base/fractions.hpp
index 0b8e576..fcd92a0 100644
--- a/src/fwk/utils/fractions.hpp
+++ b/src/fwk/base/fractions.hpp
@@ -1,5 +1,5 @@
 /*
- * niepce - fwk/utils/fractions.hpp
+ * niepce - fwk/base/fractions.hpp
  *
  * Copyright (C) 2008-2009 Hubert Figuiere
  *
diff --git a/src/fwk/utils/geometry.cpp b/src/fwk/base/geometry.cpp
similarity index 97%
rename from src/fwk/utils/geometry.cpp
rename to src/fwk/base/geometry.cpp
index a28673e..fd7d576 100644
--- a/src/fwk/utils/geometry.cpp
+++ b/src/fwk/base/geometry.cpp
@@ -1,5 +1,5 @@
 /*
- * niepce - utils/geometry.cpp
+ * niepce - fwk/base/geometry.cpp
  *
  * Copyright (C) 2007-2008 Hubert Figuiere
  *
@@ -23,10 +23,10 @@
 #include <boost/algorithm/string/split.hpp>
 #include <boost/algorithm/string/classification.hpp>
 
-#include "debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "geometry.hpp"
 
-namespace utils {
+namespace fwk {
 
 Rect::Rect()
 {
diff --git a/src/fwk/utils/geometry.hpp b/src/fwk/base/geometry.hpp
similarity index 94%
rename from src/fwk/utils/geometry.hpp
rename to src/fwk/base/geometry.hpp
index f21b00a..7c444ad 100644
--- a/src/fwk/utils/geometry.hpp
+++ b/src/fwk/base/geometry.hpp
@@ -1,5 +1,5 @@
 /*
- * niepce - utils/geometry.h
+ * niepce - fwk/base/geometry.h
  *
  * Copyright (C) 2007 Hubert Figuiere
  *
@@ -18,13 +18,13 @@
  */
 
 
-#ifndef __UTILS_GEOMETRY_H__
-#define __UTILS_GEOMETRY_H__
+#ifndef __FWK_BASE_GEOMETRY_H__
+#define __FWK_BASE_GEOMETRY_H__
 
 #include <tr1/array>
 #include <string>
 
-namespace utils {
+namespace fwk {
 
 class Rect
 {
diff --git a/src/fwk/utils/moniker.cpp b/src/fwk/base/moniker.cpp
similarity index 93%
rename from src/fwk/utils/moniker.cpp
rename to src/fwk/base/moniker.cpp
index 5d15b93..708c2a5 100644
--- a/src/fwk/utils/moniker.cpp
+++ b/src/fwk/base/moniker.cpp
@@ -1,7 +1,7 @@
 /*
- * niepce - utils/moniker.cpp
+ * niepce - fwk/base/moniker.cpp
  *
- * Copyright (C) 2007 Hubert Figuiere
+ * Copyright (C) 2007-2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -22,10 +22,10 @@
 #include <boost/range.hpp>
 #include <boost/algorithm/string/find.hpp>
 
-#include "debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "moniker.hpp"
 
-namespace utils {
+namespace fwk {
 
 	Moniker::Moniker(const std::string & s)
 	{
diff --git a/src/fwk/utils/moniker.hpp b/src/fwk/base/moniker.hpp
similarity index 89%
rename from src/fwk/utils/moniker.hpp
rename to src/fwk/base/moniker.hpp
index 86a706f..397b67e 100644
--- a/src/fwk/utils/moniker.hpp
+++ b/src/fwk/base/moniker.hpp
@@ -1,7 +1,7 @@
 /*
- * niepce - utils/moniker.h
+ * niepce - fwk/base/moniker.hpp
  *
- * Copyright (C) 2007 Hubert Figuiere
+ * Copyright (C) 2007-2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -18,14 +18,14 @@
  */
 
 
-#ifndef __UTILS_MONIKER_H__
-#define __UTILS_MONIKER_H__
+#ifndef __FWK_BASE_MONIKER_H__
+#define __FWK_BASE_MONIKER_H__
 
 #include <ostream>
 #include <string>
 
 
-namespace utils {
+namespace fwk {
 
 	/** Moniker are URL like specifiers
 			In the form of scheme:path.
diff --git a/src/fwk/utils/testgeometry.cpp b/src/fwk/base/t/testgeometry.cpp
similarity index 98%
rename from src/fwk/utils/testgeometry.cpp
rename to src/fwk/base/t/testgeometry.cpp
index 0d5f4f2..2cf946e 100644
--- a/src/fwk/utils/testgeometry.cpp
+++ b/src/fwk/base/t/testgeometry.cpp
@@ -22,10 +22,9 @@
 
 #include <stdlib.h>
 #include <vector>
+#include "fwk/base/geometry.hpp"
 
-#include "geometry.hpp"
-
-using utils::Rect;
+using fwk::Rect;
 
 int test_main( int, char *[] )             // note the name!
 {
diff --git a/src/fwk/utils/testmoniker.cpp b/src/fwk/base/t/testmoniker.cpp
similarity index 93%
rename from src/fwk/utils/testmoniker.cpp
rename to src/fwk/base/t/testmoniker.cpp
index fa34220..e604ea2 100644
--- a/src/fwk/utils/testmoniker.cpp
+++ b/src/fwk/base/t/testmoniker.cpp
@@ -21,12 +21,12 @@
 
 #include <boost/test/minimal.hpp>
 
-#include "moniker.hpp"
+#include "fwk/base/moniker.hpp"
 
 
 int test_main( int, char *[] )             // note the name!
 {
-	utils::Moniker moniker("foo:/bar/test");
+	fwk::Moniker moniker("foo:/bar/test");
 
 	BOOST_CHECK(moniker.scheme() == "foo");
 	BOOST_CHECK(moniker.path() == "/bar/test");
diff --git a/src/fwk/toolkit/application.cpp b/src/fwk/toolkit/application.cpp
index 49641d6..08d981d 100644
--- a/src/fwk/toolkit/application.cpp
+++ b/src/fwk/toolkit/application.cpp
@@ -27,8 +27,8 @@
 #include <gtkmm/rc.h>
 #include <gconf/gconf.h>
 
+#include "fwk/base/debug.hpp"
 #include "fwk/utils/boost.hpp"
-#include "fwk/utils/debug.hpp"
 #include "application.hpp"
 #include "frame.hpp"
 
diff --git a/src/fwk/toolkit/configdatabinder.hpp b/src/fwk/toolkit/configdatabinder.hpp
index 6042377..44d2547 100644
--- a/src/fwk/toolkit/configdatabinder.hpp
+++ b/src/fwk/toolkit/configdatabinder.hpp
@@ -28,7 +28,7 @@
 
 #include <glibmm/propertyproxy.h>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "fwk/utils/databinder.hpp"
 #include "fwk/toolkit/configuration.hpp"
 
diff --git a/src/fwk/toolkit/configuration.cpp b/src/fwk/toolkit/configuration.cpp
index e9cd6ff..c9e86f1 100644
--- a/src/fwk/toolkit/configuration.cpp
+++ b/src/fwk/toolkit/configuration.cpp
@@ -22,7 +22,7 @@
 
 #include <gconf/gconf-client.h>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "configuration.hpp"
 
 
diff --git a/src/fwk/toolkit/controller.cpp b/src/fwk/toolkit/controller.cpp
index 5a99065..c88e732 100644
--- a/src/fwk/toolkit/controller.cpp
+++ b/src/fwk/toolkit/controller.cpp
@@ -21,8 +21,8 @@
 
 #include <gtkmm/widget.h>
 
+#include "fwk/base/debug.hpp"
 #include "fwk/utils/boost.hpp"
-#include "fwk/utils/debug.hpp"
 #include "controller.hpp"
 
 
diff --git a/src/fwk/toolkit/frame.cpp b/src/fwk/toolkit/frame.cpp
index e3a7496..07bc82e 100644
--- a/src/fwk/toolkit/frame.cpp
+++ b/src/fwk/toolkit/frame.cpp
@@ -23,9 +23,9 @@
 
 #include <gtkmm/dialog.h>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
+#include "fwk/base/geometry.hpp"
 #include "fwk/utils/boost.hpp"
-#include "fwk/utils/geometry.hpp"
 #include "frame.hpp"
 #include "application.hpp"
 
@@ -132,7 +132,7 @@ void Frame::frameRectFromConfig()
         val = cfg.getValue(m_layout_cfg_key, "");
         if(!val.empty()) {
             try {
-                utils::Rect r(val);
+                fwk::Rect r(val);
                 m_window->move(r.x(), r.y());
                 m_window->resize(r.w(), r.h());				
             }
@@ -154,7 +154,7 @@ void Frame::frameRectToConfig()
         x = y = w = h = 0;
         m_window->get_position(x, y);
         m_window->get_size(w, h);
-        utils::Rect r(x, y, w, h);
+        fwk::Rect r(x, y, w, h);
         cfg.setValue(m_layout_cfg_key, r.to_string());
 		}
 }
diff --git a/src/fwk/toolkit/metadatawidget.cpp b/src/fwk/toolkit/metadatawidget.cpp
index f80b64e..8efc10d 100644
--- a/src/fwk/toolkit/metadatawidget.cpp
+++ b/src/fwk/toolkit/metadatawidget.cpp
@@ -25,10 +25,10 @@
 #include <glibmm/i18n.h>
 #include <gtkmm/label.h>
 
-#include "fwk/utils/fractions.hpp"
+#include "fwk/base/debug.hpp"
+#include "fwk/base/fractions.hpp"
 #include "fwk/utils/exempi.hpp"
 #include "fwk/utils/stringutils.hpp"
-#include "fwk/utils/debug.hpp"
 
 #include "metadatawidget.hpp"
 
@@ -60,7 +60,7 @@ void clear_widget(std::pair<const std::string, Gtk::Widget *> & p)
 }
 }
 
-void MetaDataWidget::set_data_source(const utils::XmpMeta * xmp)
+void MetaDataWidget::set_data_source(const fwk::XmpMeta * xmp)
 {
     DBG_OUT("set data source");
     if(!m_data_map.empty()) {
@@ -89,7 +89,7 @@ void MetaDataWidget::set_data_source(const utils::XmpMeta * xmp)
             while(xmp_iterator_next(iter, NULL, NULL, value, NULL)) {
                 vec.push_back(xmp_string_cstr(value));
             }
-            std::string v = utils::join(vec, ", ");
+            std::string v = fwk::join(vec, ", ");
             add_data(id, current->label, v.c_str(), current->type);
         }
         else {
diff --git a/src/fwk/toolkit/metadatawidget.hpp b/src/fwk/toolkit/metadatawidget.hpp
index 1da5316..cd163d6 100644
--- a/src/fwk/toolkit/metadatawidget.hpp
+++ b/src/fwk/toolkit/metadatawidget.hpp
@@ -28,15 +28,14 @@
 
 #include "fwk/toolkit/widgets/toolboxitemwidget.hpp"
 
-namespace utils {
-	class XmpMeta;
-}
 namespace xmp {
 	struct MetaDataSectionFormat;
 }
 
 namespace fwk {
 
+class XmpMeta;
+
 
 class MetaDataWidget 
 	: public fwk::ToolboxItemWidget
@@ -47,7 +46,7 @@ public:
 	void add_data(const std::string & id, const std::string & label,
 				  const char * value, xmp::MetaDataType type);
 	void set_data_format(const xmp::MetaDataSectionFormat * fmt);
-	void set_data_source(const utils::XmpMeta * xmp);
+	void set_data_source(const fwk::XmpMeta * xmp);
 protected:
 private:
 	Gtk::Table    m_table;
diff --git a/src/fwk/toolkit/mimetype.cpp b/src/fwk/toolkit/mimetype.cpp
index b74cdf0..0760067 100644
--- a/src/fwk/toolkit/mimetype.cpp
+++ b/src/fwk/toolkit/mimetype.cpp
@@ -22,7 +22,7 @@
 
 #include "config.h"
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "fwk/utils/pathutils.hpp"
 #include "mimetype.hpp"
 
diff --git a/src/fwk/toolkit/notificationcenter.cpp b/src/fwk/toolkit/notificationcenter.cpp
index 8f80afc..341fe43 100644
--- a/src/fwk/toolkit/notificationcenter.cpp
+++ b/src/fwk/toolkit/notificationcenter.cpp
@@ -38,7 +38,7 @@ namespace fwk {
 		typedef std::list< subscriber_t > SubscriberList;
 		Glib::Dispatcher                     m_dispatcher;
 		sigc::connection                     m_dispatchConn;
-		utils::MtQueue< Notification::Ptr >  m_notificationQueue;
+		fwk::MtQueue< Notification::Ptr >    m_notificationQueue;
 		std::map< int, SubscriberList >      m_subscribers;
 	};
 
diff --git a/src/fwk/toolkit/undo.cpp b/src/fwk/toolkit/undo.cpp
index 4dbd8ac..ae788bd 100644
--- a/src/fwk/toolkit/undo.cpp
+++ b/src/fwk/toolkit/undo.cpp
@@ -21,7 +21,7 @@
 #include <boost/bind.hpp>
 #include <boost/checked_delete.hpp>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "command.hpp"
 #include "undo.hpp"
 
diff --git a/src/fwk/toolkit/widgets/editablehscale.cpp b/src/fwk/toolkit/widgets/editablehscale.cpp
index 69728ef..0d0b576 100644
--- a/src/fwk/toolkit/widgets/editablehscale.cpp
+++ b/src/fwk/toolkit/widgets/editablehscale.cpp
@@ -21,7 +21,7 @@
 
 #include <glibmm/property.h>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "editablehscale.hpp"
 
 
diff --git a/src/fwk/utils/Makefile.am b/src/fwk/utils/Makefile.am
index 6ff64c8..48f8b12 100644
--- a/src/fwk/utils/Makefile.am
+++ b/src/fwk/utils/Makefile.am
@@ -4,35 +4,32 @@ DIST_SUBDIRS = db
 INCLUDES = -I$(top_srcdir)/src/ @LIBGLIBMM_CFLAGS@ \
 	@EXEMPI_CFLAGS@ @LIBXML2_CFLAGS@
 
-TESTS = testmoniker testfiles testgeometry testxmp \
+TESTS = testfiles testxmp \
 	testpathutils \
 	teststringutils test_db test_db2 test_db3 test_db4 testufrawmeta
 
 EXTRA_DIST = test.xmp test2.ufraw
 
-check_PROGRAMS = testmoniker testfiles testgeometry testxmp \
+check_PROGRAMS = testfiles testxmp \
 	testpathutils \
 	teststringutils test_db test_db2 test_db3 test_db4 testufrawmeta
 
-testmoniker_SOURCES = testmoniker.cpp
-testmoniker_LDADD = libniepceutils.a \
-	@LIBGLIBMM_LIBS@
 
 testfiles_SOURCES = testfiles.cpp
 testfiles_LDADD = libniepceutils.a \
+	../libfwk.a \
 	@LIBGLIBMM_LIBS@
 
-testgeometry_SOURCES = testgeometry.cpp
-testgeometry_LDADD = libniepceutils.a \
-	@LIBGLIBMM_LIBS@
 
 testxmp_SOURCES = testxmp.cpp
 testxmp_LDADD = libniepceutils.a \
+	../libfwk.a \
 	@EXEMPI_LIBS@ @LIBGLIBMM_LIBS@
 
 testufrawmeta_SOURCES = testufrawmeta.cpp
 testufrawmeta_CXXFLAGS =  -g -O0
 testufrawmeta_LDADD = libniepceutils.a \
+	../libfwk.a \
 	@EXEMPI_LIBS@ @LIBXML2_LIBS@ \
 	@LIBGLIBMM_LIBS@
 
@@ -46,21 +43,25 @@ testpathutils_LDADD = libniepceutils.a \
 
 test_db_SOURCES = db/test_db.cpp
 test_db_LDADD = libniepceutils.a \
+	../libfwk.a \
 	@LIBGLIBMM_LIBS \
 	@SQLITE3_LIBS@
 
 test_db2_SOURCES = db/test_db2.cpp
 test_db2_LDADD = libniepceutils.a \
+	../libfwk.a \
 	@LIBGLIBMM_LIBS \
 	@SQLITE3_LIBS@
 
 test_db3_SOURCES = db/test_db3.cpp
 test_db3_LDADD = libniepceutils.a \
+	../libfwk.a \
 	@LIBGLIBMM_LIBS \
 	@SQLITE3_LIBS@
 
 test_db4_SOURCES = db/test_db4.cpp
 test_db4_LDADD = libniepceutils.a \
+	../libfwk.a \
 	@LIBGLIBMM_LIBS \
 	@SQLITE3_LIBS@
 
@@ -70,16 +71,12 @@ libniepceutils_a_SOURCES = \
 	init.hpp init.cpp \
 	exception.hpp exception.cpp \
 	fsutils.cpp fsutils.hpp \
-	fractions.cpp fractions.hpp \
 	mtqueue.hpp stringutils.hpp \
-	autoflag.hpp \
 	exempi.hpp exempi.cpp \
 	ufrawmeta.hpp ufrawmeta.cpp \
 	buffer.hpp logstreamutils.hpp \
-	moniker.hpp moniker.cpp \
-	debug.hpp debug.cpp boost.hpp \
+	boost.hpp \
 	files.hpp files.cpp \
-	geometry.hpp geometry.cpp \
 	thread.hpp thread.cpp worker.hpp \
 	pathutils.hpp pathutils.cpp \
 	databinder.hpp databinder.cpp \
diff --git a/src/fwk/utils/boost.hpp b/src/fwk/utils/boost.hpp
index 10cb9fd..1ef711c 100644
--- a/src/fwk/utils/boost.hpp
+++ b/src/fwk/utils/boost.hpp
@@ -53,7 +53,7 @@ T_CppObject *get_pointer(const shared_ptr< T_CppObject > &p)
 }
 }
 
-namespace utils {
+namespace fwk {
 
 /** function to make a shared_ptr<> form a weak_ptr<> 
  * idea from http://lists.boost.org/boost-users/2007/01/24384.php
@@ -70,7 +70,7 @@ std::tr1::shared_ptr<T> shared_ptr_from( std::tr1::weak_ptr<T> const & wpt )
  * this allow breaking some circular references.
  */
 #define BIND_SHARED_PTR(_type, _spt) \
-    boost::bind(&utils::shared_ptr_from<_type>, std::tr1::weak_ptr<_type>(_spt))
+    boost::bind(&fwk::shared_ptr_from<_type>, std::tr1::weak_ptr<_type>(_spt))
 
 
 #endif
diff --git a/src/fwk/utils/buffer.hpp b/src/fwk/utils/buffer.hpp
index 6b98a94..1daf2b3 100644
--- a/src/fwk/utils/buffer.hpp
+++ b/src/fwk/utils/buffer.hpp
@@ -26,7 +26,7 @@
 #ifndef __NEMIVER_BUFFER_H__
 #define __NEMIVER_BUFFER_H__
 
-namespace utils {
+namespace fwk {
 
 class Buffer {
     char * m_data ;
diff --git a/src/fwk/utils/databinder.cpp b/src/fwk/utils/databinder.cpp
index 7552c64..ded4212 100644
--- a/src/fwk/utils/databinder.cpp
+++ b/src/fwk/utils/databinder.cpp
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "databinder.hpp"
 
 namespace fwk {
diff --git a/src/fwk/utils/db/iconnectiondriver.hpp b/src/fwk/utils/db/iconnectiondriver.hpp
index 3797780..a5a9bec 100644
--- a/src/fwk/utils/db/iconnectiondriver.hpp
+++ b/src/fwk/utils/db/iconnectiondriver.hpp
@@ -31,7 +31,7 @@
 
 #include <boost/function.hpp>
 
-namespace utils {
+namespace fwk {
 class Buffer ;
 //class UString ;
 }
@@ -87,10 +87,10 @@ public:
                                   enum ColumnType &) const = 0;
 
     virtual bool get_column_name (uint32_t a_offset,
-                                  utils::Buffer &a_name) const = 0;
+                                  fwk::Buffer &a_name) const = 0;
 
     virtual bool get_column_content (uint32_t a_offset,
-                                     utils::Buffer &a_column_content) const = 0;
+                                     fwk::Buffer &a_column_content) const = 0;
 
     virtual bool get_column_content (uint32_t a_offset,
                                      int32_t &a_column_content) const = 0;
diff --git a/src/fwk/utils/db/sqlite/sqlitecnxdrv.cpp b/src/fwk/utils/db/sqlite/sqlitecnxdrv.cpp
index 6dd2ff9..94e4e93 100644
--- a/src/fwk/utils/db/sqlite/sqlitecnxdrv.cpp
+++ b/src/fwk/utils/db/sqlite/sqlitecnxdrv.cpp
@@ -37,7 +37,7 @@
 #include <sqlite3.h>
 #include "fwk/utils/exception.hpp"
 #include "fwk/utils/buffer.hpp"
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "fwk/utils/db/sqlstatement.hpp"
 #include "sqlitecnxdrv.hpp"
 
@@ -319,7 +319,7 @@ namespace db { namespace sqlite {
 			case COLUMN_TYPE_BLOB:
 			{
 			  try {
-				const utils::Buffer* blob(boost::any_cast<const utils::Buffer*>(iter->get<2>()));
+				const fwk::Buffer* blob(boost::any_cast<const fwk::Buffer*>(iter->get<2>()));
 				sqlite3_bind_blob(m_priv->cur_stmt, idx, blob->get_data(), 
 								  blob->get_len(), SQLITE_STATIC);
 			  }
@@ -413,7 +413,7 @@ namespace db { namespace sqlite {
 
 		bool
 		SqliteCnxDrv::get_column_content (uint32_t a_offset,
-										  utils::Buffer &a_column_content) const
+										  fwk::Buffer &a_column_content) const
 		{
       Glib::RecMutex::Lock lock(m_mutex);
 			THROW_IF_FAIL (m_priv) ;
@@ -536,7 +536,7 @@ namespace db { namespace sqlite {
 		}
 
 		bool
-		SqliteCnxDrv::get_column_name (uint32_t a_offset, utils::Buffer &a_name) const
+		SqliteCnxDrv::get_column_name (uint32_t a_offset, fwk::Buffer &a_name) const
 		{
       Glib::RecMutex::Lock lock(m_mutex);
 			THROW_IF_FAIL (m_priv) ;
diff --git a/src/fwk/utils/db/sqlite/sqlitecnxdrv.hpp b/src/fwk/utils/db/sqlite/sqlitecnxdrv.hpp
index 7cf11c0..4465106 100644
--- a/src/fwk/utils/db/sqlite/sqlitecnxdrv.hpp
+++ b/src/fwk/utils/db/sqlite/sqlitecnxdrv.hpp
@@ -78,10 +78,10 @@ public:
     bool get_column_type (uint32_t a_offset,
                           enum db::ColumnType &a_type) const ;
 
-    bool get_column_name (uint32_t a_offset, utils::Buffer &a_name) const ;
+    bool get_column_name (uint32_t a_offset, fwk::Buffer &a_name) const ;
 
     bool get_column_content (uint32_t a_offset,
-                             utils::Buffer &a_column_content) const ;
+                             fwk::Buffer &a_column_content) const ;
 
     bool get_column_content (uint32_t a_offset,
                              int32_t &a_column_content) const ;
diff --git a/src/fwk/utils/db/sqlstatement.cpp b/src/fwk/utils/db/sqlstatement.cpp
index 8db4768..33154fa 100644
--- a/src/fwk/utils/db/sqlstatement.cpp
+++ b/src/fwk/utils/db/sqlstatement.cpp
@@ -71,7 +71,7 @@ SQLStatement::bind(int idx, const std::string & text)
 
 
 bool 
-SQLStatement::bind(int idx, const utils::Buffer & blob)
+SQLStatement::bind(int idx, const fwk::Buffer & blob)
 {
     m_bindings.push_back(binder_t(COLUMN_TYPE_BLOB, idx, 
                                       boost::any(&blob)));
diff --git a/src/fwk/utils/db/sqlstatement.hpp b/src/fwk/utils/db/sqlstatement.hpp
index d857a55..c2b1f7c 100644
--- a/src/fwk/utils/db/sqlstatement.hpp
+++ b/src/fwk/utils/db/sqlstatement.hpp
@@ -119,7 +119,7 @@ public:
     static std::string escape_string (const std::string &a_sql_string) ;
 
 	bool bind(int idx, const std::string & text);
-	bool bind(int idx, const utils::Buffer & blob);
+	bool bind(int idx, const fwk::Buffer & blob);
 
     operator const char* () const ;
     friend std::iostream& operator<< (std::iostream&, const SQLStatement&) ;
diff --git a/src/fwk/utils/db/test_db.cpp b/src/fwk/utils/db/test_db.cpp
index bb8ae5e..ad6b964 100644
--- a/src/fwk/utils/db/test_db.cpp
+++ b/src/fwk/utils/db/test_db.cpp
@@ -22,7 +22,7 @@
 #include <boost/scoped_ptr.hpp>
 
 #include "fwk/utils/buffer.hpp"
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 
 #include "sqlstatement.hpp"
 #include "insertstatement.hpp"
diff --git a/src/fwk/utils/db/test_db2.cpp b/src/fwk/utils/db/test_db2.cpp
index e697d3e..a822ead 100644
--- a/src/fwk/utils/db/test_db2.cpp
+++ b/src/fwk/utils/db/test_db2.cpp
@@ -22,7 +22,7 @@
 #include <boost/scoped_ptr.hpp>
 
 #include "fwk/utils/buffer.hpp"
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 
 #include "sqlstatement.hpp"
 #include "insertstatement.hpp"
diff --git a/src/fwk/utils/db/test_db3.cpp b/src/fwk/utils/db/test_db3.cpp
index 55c3f72..cfb7c85 100644
--- a/src/fwk/utils/db/test_db3.cpp
+++ b/src/fwk/utils/db/test_db3.cpp
@@ -22,7 +22,7 @@
 #include <boost/scoped_ptr.hpp>
 
 #include "fwk/utils/buffer.hpp"
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 
 #include "sqlstatement.hpp"
 #include "insertstatement.hpp"
@@ -52,7 +52,7 @@ int test_main(int, char *[])
 		const char * sql = "INSERT INTO foo (bar, baz) VALUES(?1, ?2);";
 		db::SQLStatement stmt(sql);
 		std::string s("zaphod");
-		utils::Buffer b("beeblebrox'", 11);
+		fwk::Buffer b("beeblebrox'", 11);
 		BOOST_CHECK(stmt.bind(1, s));
 		BOOST_CHECK(stmt.bind(2, b));
 		
@@ -65,7 +65,7 @@ int test_main(int, char *[])
 		BOOST_CHECK(drv->should_have_data());
 		BOOST_CHECK(drv->read_next_row());
 		std::string s2;
-		utils::Buffer b2;
+		fwk::Buffer b2;
 		BOOST_CHECK(drv->get_column_content(0, s2));
 		BOOST_CHECK(s == s2);
 		BOOST_CHECK(drv->get_column_content(1, b2));
diff --git a/src/fwk/utils/db/test_db4.cpp b/src/fwk/utils/db/test_db4.cpp
index 8748ec7..27a0fa5 100644
--- a/src/fwk/utils/db/test_db4.cpp
+++ b/src/fwk/utils/db/test_db4.cpp
@@ -22,7 +22,7 @@
 #include <boost/scoped_ptr.hpp>
 
 #include "fwk/utils/buffer.hpp"
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 
 #include "sqlstatement.hpp"
 #include "insertstatement.hpp"
diff --git a/src/fwk/utils/exception.cpp b/src/fwk/utils/exception.cpp
index 8e0ed89..e34f5d3 100644
--- a/src/fwk/utils/exception.cpp
+++ b/src/fwk/utils/exception.cpp
@@ -30,7 +30,7 @@
 
 #include "exception.hpp"
 
-namespace utils {
+namespace fwk {
 
 Exception::Exception (const char* a_reason): std::runtime_error (a_reason)
 {}
diff --git a/src/fwk/utils/exception.hpp b/src/fwk/utils/exception.hpp
index 909b095..6ccb343 100644
--- a/src/fwk/utils/exception.hpp
+++ b/src/fwk/utils/exception.hpp
@@ -36,7 +36,7 @@
 
 #include "logstreamutils.hpp"
 
-namespace utils {
+namespace fwk {
 
 class Exception: public std::runtime_error
 {
@@ -53,14 +53,14 @@ public:
 #define THROW_IF_FAIL(a_cond) \
 if (!(a_cond)) { \
 LOG_EXCEPTION (std::string("condition (") + #a_cond + ") failed; raising exception" ) ;\
-throw utils::Exception \
+throw fwk::Exception \
     (std::string ("Assertion failed: ") + #a_cond)  ;\
 }
 
 #define THROW_IF_FAIL2(a_cond, a_reason) \
 if (!(a_cond)) { \
 LOG_EXCEPTION (std::string("condition (") + #a_cond + ") failed; raising exception " + a_reason);\
-throw utils::Exception (a_reason)  ;\
+throw fwk::Exception (a_reason)  ;\
 }
 
 #define THROW_IF_FAIL3(a_cond, type, a_reason) \
@@ -76,7 +76,7 @@ LOG_EXCEPTION ("condition (" << #a_cond << ") failed; raising exception " << a_r
 
 #define THROW(a_reason) \
 LOG_EXCEPTION (std::string("raised exception: ") + std::string(a_reason)); \
-throw utils::Exception (std::string (a_reason))  ;
+throw fwk::Exception (std::string (a_reason))  ;
 
 #define THROW_EMPTY \
 LOG_EXCEPTION ("raised empty exception " << endl) ; \
diff --git a/src/fwk/utils/exempi.cpp b/src/fwk/utils/exempi.cpp
index a1dcbf6..202da18 100644
--- a/src/fwk/utils/exempi.cpp
+++ b/src/fwk/utils/exempi.cpp
@@ -29,7 +29,7 @@
 #include <exempi/xmp.h>
 #include <exempi/xmpconsts.h>
 
-#include "debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "exempi.hpp"
 #include "pathutils.hpp"
 
@@ -40,7 +40,7 @@ const char * UFRAW_INTEROP_NS_PREFIX = "ufrint";
 
 }
 
-namespace utils {
+namespace fwk {
 
 ExempiManager::ExempiManager(const ns_defs_t* namespaces)
 {
diff --git a/src/fwk/utils/exempi.hpp b/src/fwk/utils/exempi.hpp
index 7db7d41..4e75445 100644
--- a/src/fwk/utils/exempi.hpp
+++ b/src/fwk/utils/exempi.hpp
@@ -105,7 +105,7 @@ extern const char * UFRAW_INTEROP_NS_PREFIX;
 }
 
 
-namespace utils {
+namespace fwk {
 
 class ExempiManager
     : public boost::noncopyable
diff --git a/src/fwk/utils/files.cpp b/src/fwk/utils/files.cpp
index a53c9ac..3c2948f 100644
--- a/src/fwk/utils/files.cpp
+++ b/src/fwk/utils/files.cpp
@@ -1,5 +1,5 @@
 /*
- * niepce - utils/files.cpp
+ * niepce - fwk/utils/files.cpp
  *
  * Copyright (C) 2007 Hubert Figuiere
  *
@@ -21,12 +21,12 @@
 
 #include <giomm/file.h>
 
-#include "debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "files.hpp"
 #include "pathutils.hpp"
 
 
-namespace utils {
+namespace fwk {
 
 	bool filter_none(const Glib::RefPtr<Gio::FileInfo> & )
 	{
diff --git a/src/fwk/utils/files.hpp b/src/fwk/utils/files.hpp
index 512b7d5..c9a31ec 100644
--- a/src/fwk/utils/files.hpp
+++ b/src/fwk/utils/files.hpp
@@ -1,5 +1,5 @@
 /*
- * niepce - utils/files.h
+ * niepce - fwk/utils/files.hpp
  *
  * Copyright (C) 2007 Hubert Figuiere
  *
@@ -31,7 +31,7 @@
 
 #include <giomm/fileinfo.h>
 
-namespace utils {
+namespace fwk {
 
 	bool filter_none(const Glib::RefPtr<Gio::FileInfo> & file);
 	bool filter_xmp_out(const Glib::RefPtr<Gio::FileInfo> & file);
diff --git a/src/fwk/utils/fsutils.cpp b/src/fwk/utils/fsutils.cpp
index 2315d76..0ecd386 100644
--- a/src/fwk/utils/fsutils.cpp
+++ b/src/fwk/utils/fsutils.cpp
@@ -1,5 +1,5 @@
 /*
- * niepce - utils/fsutils.cpp
+ * niepce - fwk/utils/fsutils.cpp
  *
  * Copyright (C) 2007 Hubert Figuiere
  *
@@ -23,7 +23,7 @@
 
 #include "fsutils.hpp"
 
-namespace utils {
+namespace fwk {
 
 
 
diff --git a/src/fwk/utils/fsutils.hpp b/src/fwk/utils/fsutils.hpp
index 7d3d003..6c33ccf 100644
--- a/src/fwk/utils/fsutils.hpp
+++ b/src/fwk/utils/fsutils.hpp
@@ -1,5 +1,5 @@
 /*
- * niepce - utils/fsutils.h
+ * niepce - fwk/utils/fsutils.h
  *
  * Copyright (C) 2007 Hubert Figuiere
  *
@@ -24,7 +24,7 @@
 
 #include "fwk/utils/pathutils.hpp"
 
-namespace utils {
+namespace fwk {
 
 class DirectoryDisposer
 {
diff --git a/src/fwk/utils/logstreamutils.hpp b/src/fwk/utils/logstreamutils.hpp
index cb3e20a..5dcf96e 100644
--- a/src/fwk/utils/logstreamutils.hpp
+++ b/src/fwk/utils/logstreamutils.hpp
@@ -34,7 +34,7 @@
 #include <cstdlib>
 #include <iostream>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 
 #define NMV_DEFAULT_DOMAIN __FILE__
 
diff --git a/src/fwk/utils/mtqueue.hpp b/src/fwk/utils/mtqueue.hpp
index 8281ec4..76f161a 100644
--- a/src/fwk/utils/mtqueue.hpp
+++ b/src/fwk/utils/mtqueue.hpp
@@ -1,5 +1,5 @@
 /*
- * niepce - utils/mtqueue.h
+ * niepce - fwk/utils/mtqueue.h
  *
  * Copyright (C) 2007-2008 Hubert Figuiere
  *
@@ -19,13 +19,13 @@
 
 
 
-#ifndef __NIEPCE_UTILS_MTQUEUE_H__
-#define __NIEPCE_UTILS_MTQUEUE_H__
+#ifndef __FWK_UTILS_MTQUEUE_H__
+#define __FWK_UTILS_MTQUEUE_H__
 
 #include <deque>
 #include <glibmm/thread.h>
 
-namespace utils {
+namespace fwk {
 
 	/** This class implement a simple deque protected 
 	 * by mutexes.
diff --git a/src/fwk/utils/stringutils.hpp b/src/fwk/utils/stringutils.hpp
index 206e951..b455c64 100644
--- a/src/fwk/utils/stringutils.hpp
+++ b/src/fwk/utils/stringutils.hpp
@@ -1,5 +1,5 @@
 /*
- * niepce - utils/stringutils.h
+ * niepce - fwk/utils/stringutils.hpp
  *
  * Copyright (C) 2008 Hubert Figuiere
  *
@@ -23,7 +23,7 @@
 
 #include <boost/range/value_type.hpp>
 
-namespace utils {
+namespace fwk {
 
 /** join elements with a separator 
  * boost has such an algorithm in later versions. This is not it, but does a
diff --git a/src/fwk/utils/testfiles.cpp b/src/fwk/utils/testfiles.cpp
index 0b60391..a875da4 100644
--- a/src/fwk/utils/testfiles.cpp
+++ b/src/fwk/utils/testfiles.cpp
@@ -26,7 +26,7 @@
 #include "files.hpp"
 #include "init.hpp"
 
-using utils::FileList;
+using fwk::FileList;
 
 int test_main( int, char *[] )             // note the name!
 {
@@ -39,10 +39,10 @@ int test_main( int, char *[] )             // note the name!
 
 	FileList::Ptr files;
 	
-	files = FileList::getFilesFromDirectory( "foo", boost::bind(utils::filter_none, _1) );
+	files = FileList::getFilesFromDirectory( "foo", boost::bind(fwk::filter_none, _1) );
 	BOOST_CHECK( !files );
 
-	files = FileList::getFilesFromDirectory( "AAtest", boost::bind(utils::filter_none, _1));
+	files = FileList::getFilesFromDirectory( "AAtest", boost::bind(fwk::filter_none, _1));
 	BOOST_CHECK( files );
 	BOOST_CHECK( files->size() == 3 );
 	
diff --git a/src/fwk/utils/teststringutils.cpp b/src/fwk/utils/teststringutils.cpp
index a7ffdbb..49f90bd 100644
--- a/src/fwk/utils/teststringutils.cpp
+++ b/src/fwk/utils/teststringutils.cpp
@@ -35,7 +35,7 @@ int test_main( int, char *[] )             // note the name!
 	v.push_back("b");
 	v.push_back("c");
 
-	std::string s = utils::join(v, ", ");
+	std::string s = fwk::join(v, ", ");
 
 	BOOST_CHECK(s == "a, b, c");
 
diff --git a/src/fwk/utils/testufrawmeta.cpp b/src/fwk/utils/testufrawmeta.cpp
index 57e5633..93d3a88 100644
--- a/src/fwk/utils/testufrawmeta.cpp
+++ b/src/fwk/utils/testufrawmeta.cpp
@@ -27,7 +27,7 @@
 #include <exempi/xmpconsts.h>
 
 #include "init.hpp"
-#include "debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "exempi.hpp"
 #include "ufrawmeta.hpp"
 
@@ -43,11 +43,11 @@ int test_main( int, char *[] )             // note the name!
 	else {
 		dir = pdir;
 	}
-	utils::ExempiManager xmpManager(NULL);
+	fwk::ExempiManager xmpManager(NULL);
 
   xmp::ScopedPtr<XmpPtr> xmp(xmp_new_empty());
 
-	utils::UfrawMeta ufraw(dir + "/test2.ufraw");
+	fwk::UfrawMeta ufraw(dir + "/test2.ufraw");
 
 	BOOST_CHECK(ufraw.ufraw_to_xmp(xmp));
 
diff --git a/src/fwk/utils/testxmp.cpp b/src/fwk/utils/testxmp.cpp
index d59c202..e2da1e6 100644
--- a/src/fwk/utils/testxmp.cpp
+++ b/src/fwk/utils/testxmp.cpp
@@ -39,9 +39,9 @@ int test_main( int, char *[] )             // note the name!
 	else {
 		dir = pdir;
 	}
-	utils::ExempiManager xmpManager;
+	fwk::ExempiManager xmpManager;
 
-	utils::XmpMeta meta(dir + "/test.xmp", true);
+	fwk::XmpMeta meta(dir + "/test.xmp", true);
 	BOOST_CHECK(meta.isOk());
 	BOOST_CHECK(meta.orientation() == 1);
 	const std::vector< std::string > & keywords(meta.keywords());
diff --git a/src/fwk/utils/thread.cpp b/src/fwk/utils/thread.cpp
index 7d4cddd..47fbc77 100644
--- a/src/fwk/utils/thread.cpp
+++ b/src/fwk/utils/thread.cpp
@@ -1,7 +1,7 @@
 /*
- * niepce - utils/thread.cpp
+ * niepce - fwk/utils/thread.cpp
  *
- * Copyright (C) 2007-2008 Hubert Figuiere
+ * Copyright (C) 2007-2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
 
 #include "thread.hpp"
 
-namespace utils {
+namespace fwk {
 
 
 	Thread::Thread()
diff --git a/src/fwk/utils/thread.hpp b/src/fwk/utils/thread.hpp
index d3a95e1..d98bb72 100644
--- a/src/fwk/utils/thread.hpp
+++ b/src/fwk/utils/thread.hpp
@@ -1,7 +1,7 @@
 /*
- * niepce - utils/thread.h
+ * niepce - fwk/utils/thread.h
  *
- * Copyright (C) 2007 Hubert Figuiere
+ * Copyright (C) 2007-2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -18,8 +18,8 @@
  */
 
 
-#ifndef __UTILS_THREAD_H__
-#define __UTILS_THREAD_H__
+#ifndef __FWK_UTILS_THREAD_H__
+#define __FWK_UTILS_THREAD_H__
 
 
 #include <string>
@@ -27,7 +27,7 @@
 #include <glibmm/thread.h>
 
 
-namespace utils {
+namespace fwk {
 
 	/** thread */
 	class Thread
diff --git a/src/fwk/utils/ufrawmeta.cpp b/src/fwk/utils/ufrawmeta.cpp
index 11e0509..116b9fb 100644
--- a/src/fwk/utils/ufrawmeta.cpp
+++ b/src/fwk/utils/ufrawmeta.cpp
@@ -1,5 +1,5 @@
 /*
- * niepce - utils/ufrawmeta.cpp
+ * niepce - fwk/utils/ufrawmeta.cpp
  *
  * Copyright (C) 2007-2008 Hubert Figuiere
  *
@@ -27,13 +27,13 @@
 
 #include <exempi/xmpconsts.h>
 
-#include "debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "ufrawmeta.hpp"
 #include "exempi.hpp"
 #include "pathutils.hpp"
 
 
-namespace utils {
+namespace fwk {
 
 	static const struct string_pair_t {
 		const char *first;
diff --git a/src/fwk/utils/ufrawmeta.hpp b/src/fwk/utils/ufrawmeta.hpp
index 5eff6f5..ad63f12 100644
--- a/src/fwk/utils/ufrawmeta.hpp
+++ b/src/fwk/utils/ufrawmeta.hpp
@@ -1,5 +1,5 @@
 /*
- * niepce - utils/ufrawmeta.h
+ * niepce - fwk/utils/ufrawmeta.h
  *
  * Copyright (C) 2007 Hubert Figuiere
  *
@@ -22,7 +22,7 @@
 #include <exempi/xmp.h>
 #include <libxml/xmlreader.h>
 
-namespace utils {
+namespace fwk {
 
 	class UfrawMeta
 	{
diff --git a/src/fwk/utils/worker.hpp b/src/fwk/utils/worker.hpp
index 8d3ae9f..405120e 100644
--- a/src/fwk/utils/worker.hpp
+++ b/src/fwk/utils/worker.hpp
@@ -1,7 +1,7 @@
 /*
- * niepce - utils/worker.h
+ * niepce - fwk/utils/worker.h
  *
- * Copyright (C) 2007-2008 Hubert Figuiere
+ * Copyright (C) 2007-2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -18,8 +18,8 @@
  */
 
 
-#ifndef __UTILS_WORKER_H__
-#define __UTILS_WORKER_H__
+#ifndef __FWK_UTILS_WORKER_H__
+#define __FWK_UTILS_WORKER_H__
 
 
 #include <string>
@@ -27,7 +27,7 @@
 #include "fwk/utils/thread.hpp"
 #include "fwk/utils/mtqueue.hpp"
 
-namespace utils {
+namespace fwk {
 
 	/** worker thread for the library */
 	template <class T>
diff --git a/src/libraryclient/clientimpl.cpp b/src/libraryclient/clientimpl.cpp
index 645611c..d319a8a 100644
--- a/src/libraryclient/clientimpl.cpp
+++ b/src/libraryclient/clientimpl.cpp
@@ -19,7 +19,7 @@
 
 #include <boost/bind.hpp>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "fwk/utils/files.hpp"
 #include "engine/library/op.hpp"
 #include "engine/library/commands.hpp"
@@ -27,20 +27,20 @@
 #include "clientimpl.hpp"
 #include "locallibraryserver.hpp"
 
-using utils::FileList;
+using fwk::FileList;
 using library::Op;
 using library::Commands;
 using library::tid_t;
 
 namespace libraryclient {
 	
-ClientImpl *ClientImpl::makeClientImpl(const utils::Moniker & moniker, 
+ClientImpl *ClientImpl::makeClientImpl(const fwk::Moniker & moniker, 
                                        const fwk::NotificationCenter::Ptr & nc)
 {
     return new ClientImpl(moniker, nc);
 }
 
-ClientImpl::ClientImpl(const utils::Moniker & moniker, const fwk::NotificationCenter::Ptr & nc)
+ClientImpl::ClientImpl(const fwk::Moniker & moniker, const fwk::NotificationCenter::Ptr & nc)
     : m_moniker(moniker),
       m_localLibrary(NULL)
 {
@@ -175,7 +175,7 @@ tid_t ClientImpl::importFromDirectory(const std::string & dir, bool manage)
     FileList::Ptr files;
 	
     files = FileList::getFilesFromDirectory(dir, 
-                                            boost::bind(&utils::filter_none, _1));
+                                            boost::bind(&fwk::filter_none, _1));
     
     tid_t id = LibraryClient::newTid();
     Op::Ptr op(new Op(id, boost::bind(&Commands::cmdImportFiles,
diff --git a/src/libraryclient/clientimpl.hpp b/src/libraryclient/clientimpl.hpp
index cd89c39..7af96e3 100644
--- a/src/libraryclient/clientimpl.hpp
+++ b/src/libraryclient/clientimpl.hpp
@@ -23,7 +23,7 @@
 
 #include <string>
 
-#include "fwk/utils/moniker.hpp"
+#include "fwk/base/moniker.hpp"
 #include "engine/library/clienttypes.hpp"
 
 
@@ -34,10 +34,10 @@ class LocalLibraryServer;
 class ClientImpl
 {
 public:
-    static ClientImpl *makeClientImpl(const utils::Moniker & moniker, 
+    static ClientImpl *makeClientImpl(const fwk::Moniker & moniker, 
                                       const fwk::NotificationCenter::Ptr & nc);
 		
-		ClientImpl(const utils::Moniker & moniker, const fwk::NotificationCenter::Ptr & nc);
+		ClientImpl(const fwk::Moniker & moniker, const fwk::NotificationCenter::Ptr & nc);
 		virtual ~ClientImpl();
 
 		library::tid_t getAllKeywords();
@@ -59,7 +59,7 @@ public:
 		library::tid_t importFromDirectory(const std::string & dir, bool manage);
 
 protected:
-		const utils::Moniker m_moniker;
+		const fwk::Moniker m_moniker;
 		LocalLibraryServer *m_localLibrary;
 };
 
diff --git a/src/libraryclient/libraryclient.cpp b/src/libraryclient/libraryclient.cpp
index 3254654..bbd5833 100644
--- a/src/libraryclient/libraryclient.cpp
+++ b/src/libraryclient/libraryclient.cpp
@@ -18,7 +18,7 @@
  */
 
 
-#include "fwk/utils/moniker.hpp"
+#include "fwk/base/moniker.hpp"
 
 #include "libraryclient.hpp"
 #include "clientimpl.hpp"
@@ -30,7 +30,7 @@ namespace libraryclient {
 
 const char * s_thumbcacheDirname = "thumbcache";
 
-LibraryClient::LibraryClient(const utils::Moniker & moniker, 
+LibraryClient::LibraryClient(const fwk::Moniker & moniker, 
                              const fwk::NotificationCenter::Ptr & nc)
     : m_pImpl(ClientImpl::makeClientImpl(moniker, nc)),
       m_thumbnailCache(moniker.path() + "/" + s_thumbcacheDirname, nc)
diff --git a/src/libraryclient/libraryclient.hpp b/src/libraryclient/libraryclient.hpp
index a1b7e46..d42c5e9 100644
--- a/src/libraryclient/libraryclient.hpp
+++ b/src/libraryclient/libraryclient.hpp
@@ -27,11 +27,8 @@
 #include "engine/library/thumbnailcache.hpp"
 #include "engine/db/storage.hpp"
 
-namespace utils {
-	class Moniker;
-}
-
 namespace fwk {
+	class Moniker;
 	class NotificationCenter;
 }
 
@@ -45,7 +42,7 @@ namespace libraryclient {
 	public:
 		typedef std::tr1::shared_ptr< LibraryClient > Ptr;
 
-		LibraryClient(const utils::Moniker & moniker, const fwk::NotificationCenter::Ptr & nc);
+		LibraryClient(const fwk::Moniker & moniker, const fwk::NotificationCenter::Ptr & nc);
 		virtual ~LibraryClient();
 
 		static library::tid_t newTid();
diff --git a/src/libraryclient/locallibraryserver.hpp b/src/libraryclient/locallibraryserver.hpp
index 8ebab90..e0a7102 100644
--- a/src/libraryclient/locallibraryserver.hpp
+++ b/src/libraryclient/locallibraryserver.hpp
@@ -31,13 +31,13 @@
 namespace libraryclient {
 
 	class LocalLibraryServer
-		: public utils::Worker< library::Op::Ptr >
+		: public fwk::Worker< library::Op::Ptr >
 	{
 	public:
 		/** create the local server for the library whose dir is specified */
 		LocalLibraryServer(const std::string & dir, 
 						   const fwk::NotificationCenter::Ptr & nc)
-			: utils::Worker< library::Op::Ptr >()
+			: fwk::Worker< library::Op::Ptr >()
 			, m_library(db::Library::Ptr(new db::Library(dir, nc)))
 			{
 			}
diff --git a/src/libraryclient/test_worker.cpp b/src/libraryclient/test_worker.cpp
index c012709..a7b8d08 100644
--- a/src/libraryclient/test_worker.cpp
+++ b/src/libraryclient/test_worker.cpp
@@ -45,7 +45,7 @@ int test_main(int, char *[])
 	char *ptempl =  mkdtemp(templ);
 	BOOST_CHECK(ptempl);
 	{
-		utils::DirectoryDisposer d(ptempl);
+		fwk::DirectoryDisposer d(ptempl);
 		LocalLibraryServer w(std::string("") + ptempl, fwk::NotificationCenter::Ptr());
 		
 		BOOST_CHECK(w._tasks().empty());
diff --git a/src/ncr/image.cpp b/src/ncr/image.cpp
index 8eb9efc..d009594 100644
--- a/src/ncr/image.cpp
+++ b/src/ncr/image.cpp
@@ -30,7 +30,7 @@ extern "C" {
 #include <geglmm/node.h>
 #include <geglmm/operation.h>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "ncr.hpp"
 #include "image.hpp"
 
diff --git a/src/niepce/Makefile.am b/src/niepce/Makefile.am
index 1d75008..ef494b5 100644
--- a/src/niepce/Makefile.am
+++ b/src/niepce/Makefile.am
@@ -19,9 +19,9 @@ niepce_LDADD = \
 	$(top_builddir)/src/engine/library/libniepcelibrary.a \
 	$(top_builddir)/src/engine/db/libniepcedb.a \
 	$(top_builddir)/src/niepce/modules/darkroom/libmoduledarkroom.a \
-	$(top_builddir)/src/fwk/libfwk.a \
 	$(top_builddir)/src/fwk/toolkit/libniepceframework.a \
 	$(top_builddir)/src/fwk/utils/libniepceutils.a \
+	$(top_builddir)/src/fwk/libfwk.a \
 	$(top_builddir)/src/ncr/libncr.a \
 	$(top_builddir)/src/ext/libgdl/libgdl.a \
 	$(top_builddir)/src/ext/libview/libview.a \
diff --git a/src/niepce/main.cpp b/src/niepce/main.cpp
index 516bf77..4606857 100644
--- a/src/niepce/main.cpp
+++ b/src/niepce/main.cpp
@@ -31,9 +31,6 @@
 #include "xmp.hpp"
 #include "ui/niepceapplication.hpp"
 
-using utils::ExempiManager;
-
-
 int main(int argc, char ** argv)
 {
   bindtextdomain(GETTEXT_PACKAGE, NIEPCE_LOCALEDIR);
@@ -42,7 +39,7 @@ int main(int argc, char ** argv)
 
   fwk::utils::init();
 
-	ExempiManager ex_manager(niepce::xmp_namespaces);
+  fwk::ExempiManager ex_manager(niepce::xmp_namespaces);
 
 	return fwk::Application::main(
 		boost::bind(&ui::NiepceApplication::create),
diff --git a/src/niepce/modules/darkroom/darkroommodule.cpp b/src/niepce/modules/darkroom/darkroommodule.cpp
index b043b47..3419eab 100644
--- a/src/niepce/modules/darkroom/darkroommodule.cpp
+++ b/src/niepce/modules/darkroom/darkroommodule.cpp
@@ -21,7 +21,7 @@
 #include <gtkmm/toolbar.h>
 #include <gtkmm/stock.h>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "fwk/toolkit/application.hpp"
 #include "fwk/toolkit/configdatabinder.hpp"
 #include "fwk/toolkit/widgets/dock.hpp"
diff --git a/src/niepce/modules/darkroom/imagecanvas.cpp b/src/niepce/modules/darkroom/imagecanvas.cpp
index 40118f4..2465034 100644
--- a/src/niepce/modules/darkroom/imagecanvas.cpp
+++ b/src/niepce/modules/darkroom/imagecanvas.cpp
@@ -20,8 +20,8 @@
 /* remove this when we require a version that does not barf warnings */
 #include "fwk/toolkit/goocanvas_proxy_header.hpp"
 //#include <goocanvasmm/canvas.h>
-#include "fwk/utils/debug.hpp"
-#include "fwk/utils/geometry.hpp"
+#include "fwk/base/debug.hpp"
+#include "fwk/base/geometry.hpp"
 
 #include "imagecanvas.hpp"
 
@@ -77,10 +77,10 @@ void ImageCanvas::_redisplay(bool force)
         // the position and dimension of the image frame
         double x, y, w, h;
 
-        utils::Rect dest(0,0, m_imagecanvas->get_width() - 8,
+        fwk::Rect dest(0,0, m_imagecanvas->get_width() - 8,
             m_imagecanvas->get_height() - 8);
-        utils::Rect source(0,0, img->get_width(), img->get_height());
-        utils::Rect frame;
+        fwk::Rect source(0,0, img->get_width(), img->get_height());
+        fwk::Rect frame;
         switch(m_zoom_mode)
         {
         case ZOOM_MODE_FIT:
diff --git a/src/niepce/stock.cpp b/src/niepce/stock.cpp
index c1ca77a..6389434 100644
--- a/src/niepce/stock.cpp
+++ b/src/niepce/stock.cpp
@@ -23,7 +23,7 @@
 #include <gtkmm/stock.h>
 #include <gtkmm/stockitem.h>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "stock.hpp"
 
 #ifndef DATADIR
diff --git a/src/niepce/ui/dialogs/editlabels.cpp b/src/niepce/ui/dialogs/editlabels.cpp
index d157737..2e18b65 100644
--- a/src/niepce/ui/dialogs/editlabels.cpp
+++ b/src/niepce/ui/dialogs/editlabels.cpp
@@ -28,7 +28,7 @@
 #include <gtkmm/label.h>
 
 #include "fwk/utils/boost.hpp"
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "fwk/toolkit/application.hpp"
 #include "fwk/toolkit/gdkutils.hpp"
 #include "fwk/toolkit/undo.hpp"
diff --git a/src/niepce/ui/dialogs/importdialog.cpp b/src/niepce/ui/dialogs/importdialog.cpp
index e572e59..1e2117f 100644
--- a/src/niepce/ui/dialogs/importdialog.cpp
+++ b/src/niepce/ui/dialogs/importdialog.cpp
@@ -28,7 +28,7 @@
 #include <gtkmm/stock.h>
 #include <gtkmm/builder.h>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "fwk/toolkit/configuration.hpp"
 #include "fwk/toolkit/application.hpp"
 #include "importdialog.hpp"
diff --git a/src/niepce/ui/filmstripcontroller.cpp b/src/niepce/ui/filmstripcontroller.cpp
index e835e9d..28fd0d9 100644
--- a/src/niepce/ui/filmstripcontroller.cpp
+++ b/src/niepce/ui/filmstripcontroller.cpp
@@ -23,7 +23,7 @@
 #include "niepce/notifications.hpp"
 #include "engine/db/library.hpp"
 #include "engine/library/thumbnailnotification.hpp"
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 
 #include "eog-thumb-nav.hpp"
 #include "eog-thumb-view.hpp"
diff --git a/src/niepce/ui/imageliststore.cpp b/src/niepce/ui/imageliststore.cpp
index b0898b1..bf40cc7 100644
--- a/src/niepce/ui/imageliststore.cpp
+++ b/src/niepce/ui/imageliststore.cpp
@@ -20,7 +20,7 @@
 #include <gtkmm/icontheme.h>
 
 #include "imageliststore.hpp"
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "fwk/toolkit/application.hpp"
 #include "fwk/toolkit/gdkutils.hpp"
 #include "niepce/notifications.hpp"
diff --git a/src/niepce/ui/librarycellrenderer.cpp b/src/niepce/ui/librarycellrenderer.cpp
index 6744b9d..e12df34 100644
--- a/src/niepce/ui/librarycellrenderer.cpp
+++ b/src/niepce/ui/librarycellrenderer.cpp
@@ -20,7 +20,7 @@
 
 #include <gdkmm/general.h>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "librarycellrenderer.hpp"
 
 #ifndef DATADIR
diff --git a/src/niepce/ui/librarymainview.cpp b/src/niepce/ui/librarymainview.cpp
index 7099571..295c779 100644
--- a/src/niepce/ui/librarymainview.cpp
+++ b/src/niepce/ui/librarymainview.cpp
@@ -19,7 +19,7 @@
 
 #include <gtkmm/togglebutton.h>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "ui/librarymainview.hpp"
 
 namespace ui {
diff --git a/src/niepce/ui/librarymainviewcontroller.cpp b/src/niepce/ui/librarymainviewcontroller.cpp
index 165cf8b..b230fe5 100644
--- a/src/niepce/ui/librarymainviewcontroller.cpp
+++ b/src/niepce/ui/librarymainviewcontroller.cpp
@@ -26,7 +26,7 @@
 #include <gtkmm/celllayout.h>
 #include <gtkmm/cellrenderer.h>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "niepce/notifications.hpp"
 #include "engine/db/library.hpp"
 #include "fwk/toolkit/application.hpp"
diff --git a/src/niepce/ui/metadatapanecontroller.cpp b/src/niepce/ui/metadatapanecontroller.cpp
index 986d7b7..969f239 100644
--- a/src/niepce/ui/metadatapanecontroller.cpp
+++ b/src/niepce/ui/metadatapanecontroller.cpp
@@ -26,7 +26,7 @@
 
 #include <exempi/xmpconsts.h>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "fwk/utils/exempi.hpp"
 #include "fwk/toolkit/metadatawidget.hpp"
 #include "metadatapanecontroller.hpp"
@@ -114,7 +114,7 @@ namespace ui {
 	}
 
 
-	void MetaDataPaneController::display(int file_id, const utils::XmpMeta * meta)
+	void MetaDataPaneController::display(int file_id, const fwk::XmpMeta * meta)
 	{
         m_fileid = file_id;
 		DBG_OUT("displaying metadata");
diff --git a/src/niepce/ui/metadatapanecontroller.hpp b/src/niepce/ui/metadatapanecontroller.hpp
index 5afbabf..1f0df58 100644
--- a/src/niepce/ui/metadatapanecontroller.hpp
+++ b/src/niepce/ui/metadatapanecontroller.hpp
@@ -43,7 +43,7 @@ public:
 		MetaDataPaneController(fwk::Dock &);
     ~MetaDataPaneController();
 		virtual Gtk::Widget * buildWidget();
-		void display(int file_id, const utils::XmpMeta * meta);
+		void display(int file_id, const fwk::XmpMeta * meta);
     int displayed_file() const 
         { return m_fileid; }
 private:
diff --git a/src/niepce/ui/niepcewindow.cpp b/src/niepce/ui/niepcewindow.cpp
index eb6e046..37c2910 100644
--- a/src/niepce/ui/niepcewindow.cpp
+++ b/src/niepce/ui/niepcewindow.cpp
@@ -31,8 +31,8 @@
 
 #include "niepce/notifications.hpp"
 #include "niepce/stock.hpp"
-#include "fwk/utils/debug.hpp"
-#include "fwk/utils/moniker.hpp"
+#include "fwk/base/debug.hpp"
+#include "fwk/base/moniker.hpp"
 #include "fwk/utils/boost.hpp"
 #include "engine/db/library.hpp"
 #include "fwk/toolkit/application.hpp"
@@ -563,7 +563,7 @@ void NiepceWindow::on_lib_notification(const fwk::Notification::Ptr &n)
 
 void NiepceWindow::open_library(const std::string & libMoniker)
 {
-    m_libClient = LibraryClient::Ptr(new LibraryClient(utils::Moniker(libMoniker),
+    m_libClient = LibraryClient::Ptr(new LibraryClient(fwk::Moniker(libMoniker),
                                                        m_lib_notifcenter));
     set_title(libMoniker);
     m_libClient->getAllLabels();
diff --git a/src/niepce/ui/selectioncontroller.cpp b/src/niepce/ui/selectioncontroller.cpp
index 9aa3f56..7af3eb4 100644
--- a/src/niepce/ui/selectioncontroller.cpp
+++ b/src/niepce/ui/selectioncontroller.cpp
@@ -22,9 +22,9 @@
 #include <gtkmm/iconview.h>
 #include <glibmm/i18n.h>
 
-#include "fwk/utils/autoflag.hpp"
+#include "fwk/base/autoflag.hpp"
 #include "fwk/utils/boost.hpp"
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "fwk/toolkit/undo.hpp"
 #include "fwk/toolkit/command.hpp"
 #include "fwk/toolkit/application.hpp"
@@ -62,7 +62,7 @@ void SelectionController::add_selectable(IImageSelectable * selectable)
 void SelectionController::activated(const Gtk::TreeModel::Path & /*path*/,
 									IImageSelectable * selectable)
 {
-	utils::AutoFlag f(m_in_handler);
+	fwk::AutoFlag f(m_in_handler);
 	int selection = selectable->get_selected();
 	DBG_OUT("item activated %d", selection);
 	signal_activated(selection);
@@ -75,7 +75,7 @@ void SelectionController::selected(IImageSelectable * selectable)
 		return;
 	}
 
-	utils::AutoFlag f(m_in_handler);
+	fwk::AutoFlag f(m_in_handler);
 
 	int selection = selectable->get_selected();
 	std::vector<IImageSelectable *>::iterator iter;
@@ -119,7 +119,7 @@ void SelectionController::_selection_move(bool backwards)
                 = (*iter)[m_imageliststore->columns().m_libfile];
             selection = libfile->id();
 
-            utils::AutoFlag f(m_in_handler);
+            fwk::AutoFlag f(m_in_handler);
         
             std::for_each(m_selectables.begin(), m_selectables.end(),
                           boost::bind(&IImageSelectable::select_image, _1,  
diff --git a/src/niepce/ui/workspacecontroller.cpp b/src/niepce/ui/workspacecontroller.cpp
index 9394546..6687db9 100644
--- a/src/niepce/ui/workspacecontroller.cpp
+++ b/src/niepce/ui/workspacecontroller.cpp
@@ -25,7 +25,7 @@
 #include <gtkmm/icontheme.h>
 #include <gtkmm/box.h>
 
-#include "fwk/utils/debug.hpp"
+#include "fwk/base/debug.hpp"
 #include "niepce/notifications.hpp"
 #include "engine/db/library.hpp" // FIXME uh oh. this shouldn't be
 #include "libraryclient/libraryclient.hpp"
diff --git a/src/niepce/xmp.cpp b/src/niepce/xmp.cpp
index 88361c5..541305d 100644
--- a/src/niepce/xmp.cpp
+++ b/src/niepce/xmp.cpp
@@ -19,14 +19,13 @@
 
 #include "xmp.hpp"
 
-using utils::ExempiManager;
 
 namespace niepce {
 
 	const char NIEPCE_XMP_NAMESPACE[] = "http://xmlns.figuiere.net/ns/niepce/1.0";;
 	const char NIEPCE_XMP_NS_PREFIX[] = "niepce";
 
-	const ExempiManager::ns_defs_t xmp_namespaces[] = 
+	const fwk::ExempiManager::ns_defs_t xmp_namespaces[] = 
 	{
 		{ NIEPCE_XMP_NAMESPACE, NIEPCE_XMP_NS_PREFIX },
 		{ 0, 0 }
diff --git a/src/niepce/xmp.hpp b/src/niepce/xmp.hpp
index 077833a..a079aad 100644
--- a/src/niepce/xmp.hpp
+++ b/src/niepce/xmp.hpp
@@ -27,7 +27,7 @@ namespace niepce {
 
 	extern const char NIEPCE_XMP_NAMESPACE[];
 	extern const char NIEPCE_XMP_NS_PREFIX[];
-	extern const utils::ExempiManager::ns_defs_t xmp_namespaces[];
+	extern const fwk::ExempiManager::ns_defs_t xmp_namespaces[];
 
 }
 



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