[niepce] collapse db:: and library:: to eng::



commit 32f387fb08743a3e4b2b8c3a041edc2d6314de0d
Author: Hubert Figuiere <hub figuiere net>
Date:   Sun May 10 02:11:27 2009 -0400

    collapse db:: and library:: to eng::
---
 src/engine/db/filebundle.cpp                   |    2 +-
 src/engine/db/filebundle.hpp                   |    4 +-
 src/engine/db/fsfile.cpp                       |    4 +-
 src/engine/db/fsfile.hpp                       |    4 +-
 src/engine/db/keyword.cpp                      |    2 +-
 src/engine/db/keyword.hpp                      |    4 +-
 src/engine/db/libfile.cpp                      |    6 ++--
 src/engine/db/libfile.hpp                      |    4 +-
 src/engine/db/libfolder.hpp                    |    4 +-
 src/engine/db/libmetadata.cpp                  |    8 +++---
 src/engine/db/libmetadata.hpp                  |    4 +-
 src/engine/db/library.cpp                      |   29 ++++++++++----------
 src/engine/db/library.hpp                      |    4 +-
 src/engine/db/metadata.hpp                     |    4 +-
 src/engine/db/storage.cpp                      |    4 +-
 src/engine/db/storage.hpp                      |    4 +-
 src/engine/db/test_filebundle.cpp              |    8 +++---
 src/engine/db/test_library.cpp                 |    8 +++---
 src/engine/library/clienttypes.hpp             |    2 +-
 src/engine/library/commands.cpp                |   25 +++++++----------
 src/engine/library/commands.hpp                |   32 +++++++++++-----------
 src/engine/library/op.cpp                      |    4 +-
 src/engine/library/op.hpp                      |    6 ++--
 src/engine/library/opqueue.hpp                 |    2 +-
 src/engine/library/test_opqueue.cpp            |    6 ++--
 src/engine/library/thumbnailcache.cpp          |    4 +--
 src/engine/library/thumbnailcache.hpp          |   12 ++++----
 src/engine/library/thumbnailnotification.hpp   |    2 +-
 src/libraryclient/clientimpl.cpp               |    6 ++--
 src/libraryclient/clientimpl.hpp               |   28 ++++++++++----------
 src/libraryclient/libraryclient.cpp            |   21 +++++++-------
 src/libraryclient/libraryclient.hpp            |   34 ++++++++++++------------
 src/libraryclient/locallibraryserver.cpp       |    2 +-
 src/libraryclient/locallibraryserver.hpp       |   10 +++---
 src/libraryclient/test_worker.cpp              |    6 ++--
 src/niepce/modules/darkroom/darkroommodule.cpp |    4 +-
 src/niepce/modules/darkroom/darkroommodule.hpp |    2 +-
 src/niepce/ui/filmstripcontroller.cpp          |   12 ++++----
 src/niepce/ui/imageliststore.cpp               |   22 +++++++-------
 src/niepce/ui/imageliststore.hpp               |    2 +-
 src/niepce/ui/librarycellrenderer.cpp          |   18 ++++++------
 src/niepce/ui/librarycellrenderer.hpp          |    6 ++--
 src/niepce/ui/librarymainviewcontroller.cpp    |   14 +++++-----
 src/niepce/ui/niepcewindow.cpp                 |   10 +++---
 src/niepce/ui/selectioncontroller.cpp          |   12 ++++----
 src/niepce/ui/selectioncontroller.hpp          |    2 +-
 src/niepce/ui/thumb-view/eog-thumb-view.cpp    |    6 ++--
 src/niepce/ui/thumb-view/eog-thumb-view.hpp    |    2 +-
 src/niepce/ui/workspacecontroller.cpp          |   26 +++++++++---------
 src/niepce/ui/workspacecontroller.hpp          |    4 +-
 50 files changed, 221 insertions(+), 230 deletions(-)

diff --git a/src/engine/db/filebundle.cpp b/src/engine/db/filebundle.cpp
index b4ec675..5e94047 100644
--- a/src/engine/db/filebundle.cpp
+++ b/src/engine/db/filebundle.cpp
@@ -24,7 +24,7 @@
 #include "fwk/toolkit/mimetype.hpp"
 
 
-namespace db {
+namespace eng {
 
 void 
 FileBundle::add(const std::string & path)
diff --git a/src/engine/db/filebundle.hpp b/src/engine/db/filebundle.hpp
index 0192c61..e41be91 100644
--- a/src/engine/db/filebundle.hpp
+++ b/src/engine/db/filebundle.hpp
@@ -1,5 +1,5 @@
 /*
- * niepce - engine/db/filebundle.h
+ * niepce - engine/db/filebundle.hpp
  *
  * Copyright (C) 2009 Hubert Figuiere
  *
@@ -27,7 +27,7 @@
 #include "fwk/utils/files.hpp"
 #include "engine/db/libfile.hpp"
 
-namespace db {
+namespace eng {
 
 
 class FileBundle
diff --git a/src/engine/db/fsfile.cpp b/src/engine/db/fsfile.cpp
index cba2076..d4580bc 100644
--- a/src/engine/db/fsfile.cpp
+++ b/src/engine/db/fsfile.cpp
@@ -1,5 +1,5 @@
 /*
- * niepce - db/fsfile.cpp
+ * niepce - eng/db/fsfile.cpp
  *
  * Copyright (C) 2009 Hubert Figuiere
  *
@@ -22,7 +22,7 @@
 #include "fsfile.hpp"
 
 
-namespace db {
+namespace eng {
 
 FsFile::FsFile(int _id, const std::string & _path)
     : m_id(_id), m_path(_path)
diff --git a/src/engine/db/fsfile.hpp b/src/engine/db/fsfile.hpp
index a4534df..d6e900b 100644
--- a/src/engine/db/fsfile.hpp
+++ b/src/engine/db/fsfile.hpp
@@ -1,5 +1,5 @@
 /*
- * niepce - db/fsfile.h
+ * niepce - eng/db/fsfile.hpp
  *
  * Copyright (C) 2009 Hubert Figuiere
  *
@@ -24,7 +24,7 @@
 #include <tr1/memory>
 
 
-namespace db {
+namespace eng {
 
 /** @brief describe a file on file system */
 class FsFile
diff --git a/src/engine/db/keyword.cpp b/src/engine/db/keyword.cpp
index a89bac5..de431ea 100644
--- a/src/engine/db/keyword.cpp
+++ b/src/engine/db/keyword.cpp
@@ -22,7 +22,7 @@
 #include "keyword.hpp"
 
 
-namespace db {
+namespace eng {
 
 	Keyword::Keyword(int _id, const std::string & _keyword)
 		: m_id(_id), m_keyword(_keyword)
diff --git a/src/engine/db/keyword.hpp b/src/engine/db/keyword.hpp
index ae8b47b..e718478 100644
--- a/src/engine/db/keyword.hpp
+++ b/src/engine/db/keyword.hpp
@@ -1,5 +1,5 @@
 /*
- * niepce - library/keyword.h
+ * niepce - eng/db/keyword.hpp
  *
  * Copyright (C) 2007 Hubert Figuiere
  *
@@ -25,7 +25,7 @@
 #include <vector>
 #include <tr1/memory>
 
-namespace db {
+namespace eng {
 
 	class Keyword
 	{
diff --git a/src/engine/db/libfile.cpp b/src/engine/db/libfile.cpp
index 5f23da2..1a86327 100644
--- a/src/engine/db/libfile.cpp
+++ b/src/engine/db/libfile.cpp
@@ -23,7 +23,7 @@
 #include "metadata.hpp"
 
 
-namespace db {
+namespace eng {
 	
 LibFile::LibFile(int _id, int _folderId, int _fsfileid, const std::string & p,
                  const std::string & _name )
@@ -74,10 +74,10 @@ void LibFile::setFileType(FileType v)
 void LibFile::setMetaData(int meta, int32_t v)
 {
     switch(meta) {
-    case MAKE_METADATA_IDX(db::META_NS_XMPCORE, db::META_XMPCORE_RATING):
+    case MAKE_METADATA_IDX(eng::META_NS_XMPCORE, eng::META_XMPCORE_RATING):
         setRating(v);
         break;
-    case MAKE_METADATA_IDX(db::META_NS_TIFF, db::META_TIFF_ORIENTATION):
+    case MAKE_METADATA_IDX(eng::META_NS_TIFF, eng::META_TIFF_ORIENTATION):
         setOrientation(v);
         break;
     default:
diff --git a/src/engine/db/libfile.hpp b/src/engine/db/libfile.hpp
index 3726a4f..ab42e2d 100644
--- a/src/engine/db/libfile.hpp
+++ b/src/engine/db/libfile.hpp
@@ -1,5 +1,5 @@
 /*
- * niepce - db/libfile.h
+ * niepce - eng/db/libfile.h
  *
  * Copyright (C) 2007-2009 Hubert Figuiere
  *
@@ -29,7 +29,7 @@
 #include "engine/db/storage.hpp"
 #include "engine/db/fsfile.hpp"
 
-namespace db {
+namespace eng {
 
 
 class LibFile
diff --git a/src/engine/db/libfolder.hpp b/src/engine/db/libfolder.hpp
index 877e800..c4ce9b8 100644
--- a/src/engine/db/libfolder.hpp
+++ b/src/engine/db/libfolder.hpp
@@ -1,5 +1,5 @@
 /*
- * niepce - db/libfolder.h
+ * niepce - eng/db/libfolder.hpp
  *
  * Copyright (C) 2007 Hubert Figuiere
  *
@@ -26,7 +26,7 @@
 #include <list>
 #include <tr1/memory>
 
-namespace db {
+namespace eng {
 
 	class LibFolder
 	{
diff --git a/src/engine/db/libmetadata.cpp b/src/engine/db/libmetadata.cpp
index 36eec49..ac31b33 100644
--- a/src/engine/db/libmetadata.cpp
+++ b/src/engine/db/libmetadata.cpp
@@ -24,7 +24,7 @@
 #include "fwk/base/debug.hpp"
 #include "libmetadata.hpp"
 
-namespace db {
+namespace eng {
 
 
 LibMetadata::LibMetadata(int _id)
@@ -39,15 +39,15 @@ bool xmpPropertyNameFromIndex(int meta, std::string & ns, std::string & property
 {
     bool found = true;
     switch(meta) {
-    case MAKE_METADATA_IDX(db::META_NS_XMPCORE, db::META_XMPCORE_RATING):
+    case MAKE_METADATA_IDX(eng::META_NS_XMPCORE, eng::META_XMPCORE_RATING):
         ns = NS_XAP;
         property = "Rating";
         break;
-    case MAKE_METADATA_IDX(db::META_NS_XMPCORE, db::META_XMPCORE_LABEL):
+    case MAKE_METADATA_IDX(eng::META_NS_XMPCORE, eng::META_XMPCORE_LABEL):
         ns = NS_XAP;
         property = "Label";
         break;
-    case MAKE_METADATA_IDX(db::META_NS_TIFF, db::META_TIFF_ORIENTATION):
+    case MAKE_METADATA_IDX(eng::META_NS_TIFF, eng::META_TIFF_ORIENTATION):
         ns = NS_TIFF;
         property = "Orientation";
         break;
diff --git a/src/engine/db/libmetadata.hpp b/src/engine/db/libmetadata.hpp
index 5155842..5f50dfc 100644
--- a/src/engine/db/libmetadata.hpp
+++ b/src/engine/db/libmetadata.hpp
@@ -1,5 +1,5 @@
 /*
- * niepce - db/libmetadata.h
+ * niepce - eng/db/libmetadata.hpp
  *
  * Copyright (C) 2008 Hubert Figuiere
  *
@@ -28,7 +28,7 @@
 #include "fwk/utils/exempi.hpp"
 #include "engine/db/metadata.hpp"
 
-namespace db {
+namespace eng {
 
 	class LibMetadata
 		: public fwk::XmpMeta
diff --git a/src/engine/db/library.cpp b/src/engine/db/library.cpp
index 87f7006..b62dc89 100644
--- a/src/engine/db/library.cpp
+++ b/src/engine/db/library.cpp
@@ -29,9 +29,9 @@
 #include "niepce/notifications.hpp"
 #include "library.hpp"
 #include "metadata.hpp"
+#include "fwk/base/debug.hpp"
 #include "fwk/utils/exception.hpp"
 #include "fwk/utils/exempi.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"
@@ -39,11 +39,10 @@
 #include "fwk/toolkit/notificationcenter.hpp"
 #include "fwk/toolkit/mimetype.hpp"
 
-using fwk::NotificationCenter;
-using eng::Label;
-
+using ::fwk::NotificationCenter;
+using ::db::SQLStatement;
 
-namespace db {
+namespace eng {
 
 const char * s_databaseName = "niepcelibrary.db";
 
@@ -262,8 +261,8 @@ int Library::addFile(int folder_id, const std::string & file, bool manage)
         int32_t rating, label_id, orientation;
         std::string label;  
         fwk::MimeType mime = fwk::MimeType(file);
-        db::LibFile::FileType file_type = db::LibFile::mimetype_to_filetype(mime);
-        fwk::XmpMeta meta(file, file_type == db::LibFile::FILE_TYPE_RAW);
+        eng::LibFile::FileType file_type = eng::LibFile::mimetype_to_filetype(mime);
+        fwk::XmpMeta meta(file, file_type == eng::LibFile::FILE_TYPE_RAW);
         label_id = 0;
         orientation = meta.orientation();
         rating = meta.rating();
@@ -334,7 +333,7 @@ int Library::addFileAndFolder(const std::string & folder, const std::string & fi
     return addFile(f ? f->id() : -1, file, manage);
 }
 
-int Library::addBundle(int folder_id, const db::FileBundle::Ptr & bundle, 
+int Library::addBundle(int folder_id, const eng::FileBundle::Ptr & bundle, 
                        bool manage)
 {
     int file_id = 0;
@@ -490,7 +489,7 @@ static LibFile::Ptr getFileFromDbRow(const db::IConnectionDriver::Ptr & dbdrv)
      * of #define for integers.
      */
     dbdrv->get_column_content(7, val);
-    f->setFileType((db::LibFile::FileType)val);
+    f->setFileType((eng::LibFile::FileType)val);
     return f;
 }
 
@@ -716,22 +715,22 @@ bool Library::setMetaData(int file_id, int meta,
     bool retval = false;
     DBG_OUT("setting metadata in column %x", meta);
     switch(meta) {
-    case MAKE_METADATA_IDX(db::META_NS_XMPCORE, db::META_XMPCORE_RATING):
-    case MAKE_METADATA_IDX(db::META_NS_XMPCORE, db::META_XMPCORE_LABEL):
-    case MAKE_METADATA_IDX(db::META_NS_TIFF, db::META_TIFF_ORIENTATION):
+    case MAKE_METADATA_IDX(eng::META_NS_XMPCORE, eng::META_XMPCORE_RATING):
+    case MAKE_METADATA_IDX(eng::META_NS_XMPCORE, eng::META_XMPCORE_LABEL):
+    case MAKE_METADATA_IDX(eng::META_NS_TIFF, eng::META_TIFF_ORIENTATION):
         if(value.type() == typeid(int32_t)) {
             // internal.
             int32_t nvalue = boost::any_cast<int32_t>(value);
             // make the column mapping more generic.
             const char * col = NULL;
             switch(meta) {
-            case MAKE_METADATA_IDX(db::META_NS_XMPCORE, db::META_XMPCORE_RATING):
+            case MAKE_METADATA_IDX(eng::META_NS_XMPCORE, eng::META_XMPCORE_RATING):
                 col = "rating";
                 break;
-            case MAKE_METADATA_IDX(db::META_NS_TIFF, db::META_TIFF_ORIENTATION):
+            case MAKE_METADATA_IDX(eng::META_NS_TIFF, eng::META_TIFF_ORIENTATION):
                 col = "orientation";
                 break;
-            case MAKE_METADATA_IDX(db::META_NS_XMPCORE, db::META_XMPCORE_LABEL):
+            case MAKE_METADATA_IDX(eng::META_NS_XMPCORE, eng::META_XMPCORE_LABEL):
                 col = "label";
                 break;
             }
diff --git a/src/engine/db/library.hpp b/src/engine/db/library.hpp
index 4f2d520..11e3732 100644
--- a/src/engine/db/library.hpp
+++ b/src/engine/db/library.hpp
@@ -45,7 +45,7 @@ namespace fwk {
 class RgbColor;
 }
 
-namespace db {
+namespace eng {
 
 class Library
 {
@@ -119,7 +119,7 @@ public:
 		 * @param bundle the bundle
 		 * @param manage pass true it the library *manage* the file. Currently unsupported.
 		 */
-    int addBundle(int folder_id, const db::FileBundle::Ptr & bundle, 
+    int addBundle(int folder_id, const eng::FileBundle::Ptr & bundle, 
                   bool manage);
     /** add a sidecar fsfile to a bundle (file)
      * @param file_id the id of the file bundle
diff --git a/src/engine/db/metadata.hpp b/src/engine/db/metadata.hpp
index cc0c6fb..f36594f 100644
--- a/src/engine/db/metadata.hpp
+++ b/src/engine/db/metadata.hpp
@@ -1,5 +1,5 @@
 /*
- * niepce - db/metadata.h
+ * niepce - eng/db/metadata.hpp
  *
  * Copyright (C) 2008 Hubert Figuiere
  *
@@ -22,7 +22,7 @@
 #ifndef _DB_METADATA_H_
 #define _DB_METADATA_H_
 
-namespace db {
+namespace eng {
 
 enum {
     META_NS_XMPCORE = 0,
diff --git a/src/engine/db/storage.cpp b/src/engine/db/storage.cpp
index 6d213c2..452ba6b 100644
--- a/src/engine/db/storage.cpp
+++ b/src/engine/db/storage.cpp
@@ -1,5 +1,5 @@
 /*
- * niepce - db/storage.cpp
+ * niepce - eng/db/storage.cpp
  *
  * Copyright (C) 2007 Hubert Figuiere
  *
@@ -19,7 +19,7 @@
 
 #include "storage.hpp"
 
-namespace db {
+namespace eng {
 
 	Storage::~Storage()
 	{
diff --git a/src/engine/db/storage.hpp b/src/engine/db/storage.hpp
index b959c13..88e0232 100644
--- a/src/engine/db/storage.hpp
+++ b/src/engine/db/storage.hpp
@@ -1,5 +1,5 @@
 /*
- * niepce - db/storage.h
+ * niepce - eng/db/storage.hpp
  *
  * Copyright (C) 2007 Hubert Figuiere
  *
@@ -25,7 +25,7 @@
 
 #include "engine/db/keyword.hpp"
 
-namespace db {
+namespace eng {
 
 	/** @brief the interface for a storage */
 	class Storage
diff --git a/src/engine/db/test_filebundle.cpp b/src/engine/db/test_filebundle.cpp
index 36c562d..8abdfa7 100644
--- a/src/engine/db/test_filebundle.cpp
+++ b/src/engine/db/test_filebundle.cpp
@@ -43,12 +43,12 @@ int test_main(int, char *[])
 
 //    thelist->push_back("/tmp/some/file");
 
-    db::FileBundle::ListPtr bundles_list = 
-        db::FileBundle::filter_bundles(thelist);
+    eng::FileBundle::ListPtr bundles_list = 
+        eng::FileBundle::filter_bundles(thelist);
 
     BOOST_CHECK(bundles_list->size() == 2);
-    db::FileBundle::List::const_iterator iter = bundles_list->begin();
-    db::FileBundle::Ptr b = *iter;
+    eng::FileBundle::List::const_iterator iter = bundles_list->begin();
+    eng::FileBundle::Ptr b = *iter;
     BOOST_CHECK(b->main_file() == "/foo/bar/dcs_0001.nef");
     BOOST_CHECK(b->jpeg() == "/foo/bar/dcs_0001.jpg");
     BOOST_CHECK(b->sidecar() == "/foo/bar/dcs_0001.xmp");
diff --git a/src/engine/db/test_library.cpp b/src/engine/db/test_library.cpp
index 79b31e7..562137c 100644
--- a/src/engine/db/test_library.cpp
+++ b/src/engine/db/test_library.cpp
@@ -34,22 +34,22 @@
 int test_main(int, char *[])
 {
     fwk::utils::init();
-    db::Library lib("./", fwk::NotificationCenter::Ptr());
+    eng::Library lib("./", fwk::NotificationCenter::Ptr());
 
     BOOST_CHECK(lib.checkDatabaseVersion() == DB_SCHEMA_VERSION);
 
     db::IConnectionDriver::Ptr db(lib.dbDriver());
 	
-    db::LibFolder::Ptr folder_added(lib.addFolder("foo"));
+    eng::LibFolder::Ptr folder_added(lib.addFolder("foo"));
     BOOST_CHECK(folder_added);
     BOOST_CHECK(folder_added->id() > 0);
-    db::LibFolder::Ptr f(lib.getFolder("foo"));
+    eng::LibFolder::Ptr f(lib.getFolder("foo"));
     BOOST_CHECK(f);
     BOOST_CHECK(f->id() == folder_added->id());
     lib.addFolder("bar");
     BOOST_CHECK(lib.getFolder("bar"));
 
-    db::LibFolder::ListPtr l( new db::LibFolder::List );
+    eng::LibFolder::ListPtr l( new eng::LibFolder::List );
     lib.getAllFolders( l );
     BOOST_CHECK( l->size() == 2 );
     
diff --git a/src/engine/library/clienttypes.hpp b/src/engine/library/clienttypes.hpp
index 0813003..4b8b226 100644
--- a/src/engine/library/clienttypes.hpp
+++ b/src/engine/library/clienttypes.hpp
@@ -20,7 +20,7 @@
 #ifndef _LIBRARY_CLIENTTYPES_H_
 #define _LIBRARY_CLIENTTYPES_H_
 
-namespace library {
+namespace eng {
 
 	typedef int tid_t; /**< transaction ID */
 
diff --git a/src/engine/library/commands.cpp b/src/engine/library/commands.cpp
index 326f072..9834d86 100644
--- a/src/engine/library/commands.cpp
+++ b/src/engine/library/commands.cpp
@@ -35,14 +35,9 @@
 #include "engine/db/label.hpp"
 #include "commands.hpp"
 
-using db::Library;
-using db::LibFolder;
-using db::LibFile;
-using db::LibMetadata;
-using db::Keyword;
 using fwk::FileList;
 
-namespace library {
+namespace eng {
 
 void Commands::cmdListAllKeywords(const Library::Ptr & lib)
 {
@@ -68,7 +63,7 @@ void Commands::cmdImportFiles(const Library::Ptr & lib,
 {
     DBG_ASSERT(!manage, "managing file is currently unsupported");
 
-    db::FileBundle::ListPtr bundles = db::FileBundle::filter_bundles(files);
+    FileBundle::ListPtr bundles = FileBundle::filter_bundles(files);
 
     LibFolder::Ptr pf;
     pf = lib->getFolder(folder);
@@ -96,7 +91,7 @@ void Commands::cmdQueryFolderContent(const Library::Ptr & lib,
     lib->notify(Library::NOTIFY_FOLDER_CONTENT_QUERIED, boost::any(fl));		
 }
 
-void Commands::cmdCountFolder(const db::Library::Ptr & lib, 
+void Commands::cmdCountFolder(const Library::Ptr & lib, 
                               int folder_id)
 {
     int count = lib->countFolder(folder_id);
@@ -111,7 +106,7 @@ void Commands::cmdQueryKeywordContent(const Library::Ptr & lib,
     lib->notify(Library::NOTIFY_KEYWORD_CONTENT_QUERIED, boost::any(fl));		
 }
 
-void Commands::cmdRequestMetadata(const db::Library::Ptr & lib,
+void Commands::cmdRequestMetadata(const Library::Ptr & lib,
                                   int file_id)
 {
     LibMetadata::Ptr lm(new LibMetadata(file_id));
@@ -119,7 +114,7 @@ void Commands::cmdRequestMetadata(const db::Library::Ptr & lib,
     lib->notify(Library::NOTIFY_METADATA_QUERIED, boost::any(lm));
 }
 
-void Commands::cmdSetMetadata(const db::Library::Ptr & lib,
+void Commands::cmdSetMetadata(const Library::Ptr & lib,
                               int file_id, int meta, int value)
 {
     std::tr1::array<int, 3> m;
@@ -130,14 +125,14 @@ void Commands::cmdSetMetadata(const db::Library::Ptr & lib,
     lib->notify(Library::NOTIFY_METADATA_CHANGED, boost::any(m));
 }
 
-void Commands::cmdListAllLabels(const db::Library::Ptr & lib)
+void Commands::cmdListAllLabels(const Library::Ptr & lib)
 {
     eng::Label::ListPtr l(new eng::Label::List);
     lib->getAllLabels(l);
     lib->notify(Library::NOTIFY_ADDED_LABELS, boost::any(l));
 }
 
-void Commands::cmdCreateLabel(const db::Library::Ptr & lib,
+void Commands::cmdCreateLabel(const Library::Ptr & lib,
                               const std::string & s, const std::string & color)
 {
     int id = lib->addLabel(s, color);
@@ -149,7 +144,7 @@ void Commands::cmdCreateLabel(const db::Library::Ptr & lib,
 }
 
 
-void Commands::cmdDeleteLabel(const db::Library::Ptr & lib,
+void Commands::cmdDeleteLabel(const Library::Ptr & lib,
                               int label_id)
 {
     lib->deleteLabel(label_id);
@@ -157,7 +152,7 @@ void Commands::cmdDeleteLabel(const db::Library::Ptr & lib,
 }
 
 
-void Commands::cmdUpdateLabel(const db::Library::Ptr & lib,
+void Commands::cmdUpdateLabel(const Library::Ptr & lib,
                               int label_id, const std::string & name,
                               const std::string & color)
 {
@@ -167,7 +162,7 @@ void Commands::cmdUpdateLabel(const db::Library::Ptr & lib,
 }
 
 
-void Commands::cmdProcessXmpUpdateQueue(const db::Library::Ptr & lib)
+void Commands::cmdProcessXmpUpdateQueue(const Library::Ptr & lib)
 {
     lib->processXmpUpdateQueue();
 }
diff --git a/src/engine/library/commands.hpp b/src/engine/library/commands.hpp
index 5712c61..4d242a9 100644
--- a/src/engine/library/commands.hpp
+++ b/src/engine/library/commands.hpp
@@ -26,7 +26,7 @@
 #include "fwk/utils/files.hpp"
 #include "engine/db/library.hpp"
 
-namespace library {
+namespace eng {
 
 /** Marshalling and demarshalling of commands ops */ 
 class Commands 
@@ -34,34 +34,34 @@ class Commands
 public:
 
 		// commands: execute an op
-//		static void cmdQueryFiles(const db::Library::Ptr & lib);
-//		static void cmdUpdateFiles(const db::Library::Ptr & lib);
+//		static void cmdQueryFiles(const Library::Ptr & lib);
+//		static void cmdUpdateFiles(const Library::Ptr & lib);
 
-		static void cmdListAllFolders(const db::Library::Ptr & lib);
-		static void cmdListAllKeywords(const db::Library::Ptr & lib);
-		static void cmdImportFiles(const db::Library::Ptr & lib, 
+		static void cmdListAllFolders(const Library::Ptr & lib);
+		static void cmdListAllKeywords(const Library::Ptr & lib);
+		static void cmdImportFiles(const Library::Ptr & lib, 
                                const std::string & folder, 
                                const fwk::FileList::Ptr & files, 
                                bool manage);
-		static void cmdQueryFolderContent(const db::Library::Ptr & lib, 
+		static void cmdQueryFolderContent(const Library::Ptr & lib, 
                                       int folder_id);
-		static void cmdCountFolder(const db::Library::Ptr & lib, 
+		static void cmdCountFolder(const Library::Ptr & lib, 
                                int folder_id);
-		static void cmdQueryKeywordContent(const db::Library::Ptr & lib, 
+		static void cmdQueryKeywordContent(const Library::Ptr & lib, 
                                        int keyword_id);
-		static void cmdRequestMetadata(const db::Library::Ptr & lib,
+		static void cmdRequestMetadata(const Library::Ptr & lib,
                                    int file_id);
-    static void cmdSetMetadata(const db::Library::Ptr & lib,
+    static void cmdSetMetadata(const Library::Ptr & lib,
                                int file_id, int meta, int value);
-    static void cmdListAllLabels(const db::Library::Ptr & lib);
-    static void cmdCreateLabel(const db::Library::Ptr & lib, const std::string & s, 
+    static void cmdListAllLabels(const Library::Ptr & lib);
+    static void cmdCreateLabel(const Library::Ptr & lib, const std::string & s, 
                                const std::string & color);
-    static void cmdDeleteLabel(const db::Library::Ptr & lib,
+    static void cmdDeleteLabel(const Library::Ptr & lib,
                                int label_id);
-    static void cmdUpdateLabel(const db::Library::Ptr & lib,
+    static void cmdUpdateLabel(const Library::Ptr & lib,
                                int label_id, const std::string & name,
                                const std::string & color);
-		static void cmdProcessXmpUpdateQueue(const db::Library::Ptr & lib);
+		static void cmdProcessXmpUpdateQueue(const Library::Ptr & lib);
 };
 
 }
diff --git a/src/engine/library/op.cpp b/src/engine/library/op.cpp
index acd6c94..4863984 100644
--- a/src/engine/library/op.cpp
+++ b/src/engine/library/op.cpp
@@ -21,7 +21,7 @@
 #include "op.hpp"
 
 
-namespace library {
+namespace eng {
 
 Op::Op(tid_t _id, const function_t & func)
     : m_id(_id),
@@ -29,7 +29,7 @@ Op::Op(tid_t _id, const function_t & func)
 {
 }
 
-void Op::operator() (const db::Library::Ptr &l)
+void Op::operator() (const Library::Ptr &l)
 {
     if(m_function) {
         m_function(l);
diff --git a/src/engine/library/op.hpp b/src/engine/library/op.hpp
index 9b5eede..7f697d5 100644
--- a/src/engine/library/op.hpp
+++ b/src/engine/library/op.hpp
@@ -27,21 +27,21 @@
 #include "engine/library/clienttypes.hpp"
 #include "engine/db/library.hpp"
 
-namespace library {
+namespace eng {
 
 	/** a library operation */
 	class Op
 	{
 	public:
 		typedef std::tr1::shared_ptr< Op > Ptr;
-		typedef boost::function<void (const db::Library::Ptr &)> function_t;
+		typedef boost::function<void (const Library::Ptr &)> function_t;
 
 		Op(tid_t id, const function_t & func);
 
 		tid_t id() const 
 			{ return m_id; }
 
-        void operator() (const db::Library::Ptr &);
+        void operator() (const Library::Ptr &);
 		const function_t & fn() const
 			{ return m_function; }
 	protected:
diff --git a/src/engine/library/opqueue.hpp b/src/engine/library/opqueue.hpp
index 79d3bea..8241499 100644
--- a/src/engine/library/opqueue.hpp
+++ b/src/engine/library/opqueue.hpp
@@ -26,7 +26,7 @@
 #include "fwk/utils/mtqueue.hpp"
 #include "op.hpp"
 
-namespace library {
+namespace eng {
 
 	typedef fwk::MtQueue< Op::Ptr > OpQueue;
 
diff --git a/src/engine/library/test_opqueue.cpp b/src/engine/library/test_opqueue.cpp
index bbaa7a5..739face 100644
--- a/src/engine/library/test_opqueue.cpp
+++ b/src/engine/library/test_opqueue.cpp
@@ -25,9 +25,9 @@
 
 #include <boost/test/minimal.hpp>
 
-using namespace library;
+using namespace eng;
 
-void foo(const db::Library::Ptr &)
+void foo(const eng::Library::Ptr &)
 {
 }
 
@@ -37,7 +37,7 @@ int test_main(int, char *[])
 {
 	OpQueue q;
 
-	Op::Ptr p(new Op(1, boost::bind(&foo, db::Library::Ptr())));
+	Op::Ptr p(new Op(1, boost::bind(&foo, eng::Library::Ptr())));
 
 	BOOST_CHECK(q.empty());
 
diff --git a/src/engine/library/thumbnailcache.cpp b/src/engine/library/thumbnailcache.cpp
index f77b8cf..9f0fd23 100644
--- a/src/engine/library/thumbnailcache.cpp
+++ b/src/engine/library/thumbnailcache.cpp
@@ -33,9 +33,7 @@
 #include "thumbnailcache.hpp"
 #include "thumbnailnotification.hpp"
 
-using db::LibFile;
-
-namespace library {
+namespace eng {
 
 	ThumbnailCache::ThumbnailCache(const std::string & dir,
 								   const fwk::NotificationCenter::Ptr & nc)
diff --git a/src/engine/library/thumbnailcache.hpp b/src/engine/library/thumbnailcache.hpp
index 8d18906..c3c2a2a 100644
--- a/src/engine/library/thumbnailcache.hpp
+++ b/src/engine/library/thumbnailcache.hpp
@@ -27,7 +27,7 @@
 #include "fwk/toolkit/notificationcenter.hpp"
 #include "engine/db/libfile.hpp"
 
-namespace library {
+namespace eng {
 
 
 	class ThumbnailTask
@@ -35,18 +35,18 @@ namespace library {
 	public:
 		typedef std::tr1::shared_ptr< ThumbnailTask > Ptr;
 		
-		ThumbnailTask(const db::LibFile::Ptr & f, int w, int h)
+		ThumbnailTask(const LibFile::Ptr & f, int w, int h)
 			: m_file(f), m_width(w), m_height(h)
 			{ }
 		
-		const db::LibFile::Ptr & file()
+		const LibFile::Ptr & file()
 			{ return m_file; }
 		int width() const
 			{ return m_width; }
 		int height() const
 			{ return m_height; }
 	private:
-		const db::LibFile::Ptr m_file;
+		const LibFile::Ptr m_file;
 		int m_width;
 		int m_height;
 	};
@@ -60,8 +60,8 @@ namespace library {
 					   const fwk::NotificationCenter::Ptr & nc);
 		~ThumbnailCache();
 
-		void request(const db::LibFile::ListPtr & fl);
-		void requestForFile(const db::LibFile::Ptr & f);
+		void request(const LibFile::ListPtr & fl);
+		void requestForFile(const LibFile::Ptr & f);
 
 	protected:
 		virtual void execute(const  ThumbnailTask::Ptr & task);
diff --git a/src/engine/library/thumbnailnotification.hpp b/src/engine/library/thumbnailnotification.hpp
index c35c953..9399a62 100644
--- a/src/engine/library/thumbnailnotification.hpp
+++ b/src/engine/library/thumbnailnotification.hpp
@@ -23,7 +23,7 @@
 
 #include <gdkmm/pixbuf.h>
 
-namespace library {
+namespace eng {
 
 	struct ThumbnailNotification
 	{
diff --git a/src/libraryclient/clientimpl.cpp b/src/libraryclient/clientimpl.cpp
index d319a8a..dfb5c2d 100644
--- a/src/libraryclient/clientimpl.cpp
+++ b/src/libraryclient/clientimpl.cpp
@@ -28,9 +28,9 @@
 #include "locallibraryserver.hpp"
 
 using fwk::FileList;
-using library::Op;
-using library::Commands;
-using library::tid_t;
+using eng::Op;
+using eng::Commands;
+using eng::tid_t;
 
 namespace libraryclient {
 	
diff --git a/src/libraryclient/clientimpl.hpp b/src/libraryclient/clientimpl.hpp
index 7af96e3..00bcacb 100644
--- a/src/libraryclient/clientimpl.hpp
+++ b/src/libraryclient/clientimpl.hpp
@@ -40,23 +40,23 @@ public:
 		ClientImpl(const fwk::Moniker & moniker, const fwk::NotificationCenter::Ptr & nc);
 		virtual ~ClientImpl();
 
-		library::tid_t getAllKeywords();
-		library::tid_t queryKeywordContent(int id);
-		library::tid_t getAllFolders();
-		library::tid_t queryFolderContent(int id);
-		library::tid_t countFolder(int id);
-		library::tid_t requestMetadata(int id);
-    library::tid_t setMetadata(int id, int meta, int value);
-
-    library::tid_t getAllLabels();
-    library::tid_t createLabel(const std::string & s, const std::string & color);
-    library::tid_t deleteLabel(int id);
-    library::tid_t updateLabel(int id, const std::string & new_name,
+		eng::tid_t getAllKeywords();
+		eng::tid_t queryKeywordContent(int id);
+		eng::tid_t getAllFolders();
+		eng::tid_t queryFolderContent(int id);
+		eng::tid_t countFolder(int id);
+		eng::tid_t requestMetadata(int id);
+    eng::tid_t setMetadata(int id, int meta, int value);
+
+    eng::tid_t getAllLabels();
+    eng::tid_t createLabel(const std::string & s, const std::string & color);
+    eng::tid_t deleteLabel(int id);
+    eng::tid_t updateLabel(int id, const std::string & new_name,
                                const std::string & new_color);
 
-    library::tid_t processXmpUpdateQueue();
+    eng::tid_t processXmpUpdateQueue();
 
-		library::tid_t importFromDirectory(const std::string & dir, bool manage);
+		eng::tid_t importFromDirectory(const std::string & dir, bool manage);
 
 protected:
 		const fwk::Moniker m_moniker;
diff --git a/src/libraryclient/libraryclient.cpp b/src/libraryclient/libraryclient.cpp
index bbd5833..4b4d4ed 100644
--- a/src/libraryclient/libraryclient.cpp
+++ b/src/libraryclient/libraryclient.cpp
@@ -23,7 +23,7 @@
 #include "libraryclient.hpp"
 #include "clientimpl.hpp"
 
-using library::tid_t;
+using eng::tid_t;
 
 
 namespace libraryclient {
@@ -35,7 +35,6 @@ LibraryClient::LibraryClient(const fwk::Moniker & moniker,
     : m_pImpl(ClientImpl::makeClientImpl(moniker, nc)),
       m_thumbnailCache(moniker.path() + "/" + s_thumbcacheDirname, nc)
 {
-
 }
 
 LibraryClient::~LibraryClient()
@@ -72,47 +71,47 @@ tid_t LibraryClient::queryKeywordContent(int id)
     return m_pImpl->queryKeywordContent(id);
 }
 
-library::tid_t LibraryClient::countFolder(int id)
+eng::tid_t LibraryClient::countFolder(int id)
 {
     return m_pImpl->countFolder(id);
 }
 
-library::tid_t LibraryClient::requestMetadata(int id)
+eng::tid_t LibraryClient::requestMetadata(int id)
 {
     return m_pImpl->requestMetadata(id);
 }
 
 /** set the metadata */
-library::tid_t LibraryClient::setMetadata(int id, int meta, int value)
+eng::tid_t LibraryClient::setMetadata(int id, int meta, int value)
 {
     return m_pImpl->setMetadata(id, meta, value);
 }
 
-library::tid_t LibraryClient::getAllLabels()
+eng::tid_t LibraryClient::getAllLabels()
 {
     return m_pImpl->getAllLabels();
 }
 
 
-library::tid_t LibraryClient::createLabel(const std::string & s, const std::string & color)
+eng::tid_t LibraryClient::createLabel(const std::string & s, const std::string & color)
 {
     return m_pImpl->createLabel(s, color);
 }
 
 
-library::tid_t LibraryClient::deleteLabel(int id)
+eng::tid_t LibraryClient::deleteLabel(int id)
 {
     return m_pImpl->deleteLabel(id);
 }
 
 
-library::tid_t LibraryClient::updateLabel(int id, const std::string & new_name,
+eng::tid_t LibraryClient::updateLabel(int id, const std::string & new_name,
                                           const std::string & new_color)
 {
     return m_pImpl->updateLabel(id, new_name, new_color);
 }
 
-library::tid_t LibraryClient::processXmpUpdateQueue()
+eng::tid_t LibraryClient::processXmpUpdateQueue()
 {
     return m_pImpl->processXmpUpdateQueue();
 }
@@ -123,7 +122,7 @@ void LibraryClient::importFromDirectory(const std::string & dir, bool manage)
 }
 
 bool LibraryClient::fetchKeywordsForFile(int /*file*/, 
-                                         db::Keyword::IdList & /*keywords*/)
+                                         eng::Keyword::IdList & /*keywords*/)
 {
     // TODO
     return false;
diff --git a/src/libraryclient/libraryclient.hpp b/src/libraryclient/libraryclient.hpp
index d42c5e9..1a67b90 100644
--- a/src/libraryclient/libraryclient.hpp
+++ b/src/libraryclient/libraryclient.hpp
@@ -37,7 +37,7 @@ namespace libraryclient {
 	class ClientImpl;
 
 	class LibraryClient
-		: public db::Storage
+		: public eng::Storage
 	{
 	public:
 		typedef std::tr1::shared_ptr< LibraryClient > Ptr;
@@ -45,34 +45,34 @@ namespace libraryclient {
 		LibraryClient(const fwk::Moniker & moniker, const fwk::NotificationCenter::Ptr & nc);
 		virtual ~LibraryClient();
 
-		static library::tid_t newTid();
+		static eng::tid_t newTid();
 		/** get all the keywords 
 		 * @return transaction ID
 		 */
-		library::tid_t getAllKeywords();
+		eng::tid_t getAllKeywords();
 		/** get all the folder
 		 * @return transaction ID
 		 */
-		library::tid_t getAllFolders();
+		eng::tid_t getAllFolders();
 
-		library::tid_t queryFolderContent(int id);
-		library::tid_t queryKeywordContent(int id);
-		library::tid_t countFolder(int id);
-		library::tid_t requestMetadata(int id);
+		eng::tid_t queryFolderContent(int id);
+		eng::tid_t queryKeywordContent(int id);
+		eng::tid_t countFolder(int id);
+		eng::tid_t requestMetadata(int id);
 
     /** set the metadata */
-    library::tid_t setMetadata(int id, int meta, int value);
+    eng::tid_t setMetadata(int id, int meta, int value);
 
     /** get all the labels */
-    library::tid_t getAllLabels();
-    library::tid_t createLabel(const std::string & s, const std::string & color);
-    library::tid_t deleteLabel(int id);
+    eng::tid_t getAllLabels();
+    eng::tid_t createLabel(const std::string & s, const std::string & color);
+    eng::tid_t deleteLabel(int id);
     /** update a label */
-    library::tid_t updateLabel(int id, const std::string & new_name, 
+    eng::tid_t updateLabel(int id, const std::string & new_name, 
                                const std::string & new_color);
 
     /** tell to process the Xmp update Queue */
-    library::tid_t processXmpUpdateQueue();
+    eng::tid_t processXmpUpdateQueue();
 
 		/** Import files from a directory
 		 * @param dir the directory
@@ -80,16 +80,16 @@ namespace libraryclient {
 		 */
 		void importFromDirectory(const std::string & dir, bool manage);
 		
-		library::ThumbnailCache & thumbnailCache()
+		eng::ThumbnailCache & thumbnailCache()
 			{ return m_thumbnailCache; }
 
 		/* sync call */
-		virtual bool fetchKeywordsForFile(int file, db::Keyword::IdList &keywords);
+		virtual bool fetchKeywordsForFile(int file, eng::Keyword::IdList &keywords);
 
 	private:
 		ClientImpl* m_pImpl;
 
-		library::ThumbnailCache                    m_thumbnailCache;
+		eng::ThumbnailCache                    m_thumbnailCache;
 
 		LibraryClient(const LibraryClient &);
 		LibraryClient & operator=(const LibraryClient &);
diff --git a/src/libraryclient/locallibraryserver.cpp b/src/libraryclient/locallibraryserver.cpp
index 287dd94..0ee9933 100644
--- a/src/libraryclient/locallibraryserver.cpp
+++ b/src/libraryclient/locallibraryserver.cpp
@@ -21,7 +21,7 @@
 
 #include "locallibraryserver.hpp"
 
-using library::Op;
+using eng::Op;
 
 namespace libraryclient {
 
diff --git a/src/libraryclient/locallibraryserver.hpp b/src/libraryclient/locallibraryserver.hpp
index e0a7102..a9e8e19 100644
--- a/src/libraryclient/locallibraryserver.hpp
+++ b/src/libraryclient/locallibraryserver.hpp
@@ -31,22 +31,22 @@
 namespace libraryclient {
 
 	class LocalLibraryServer
-		: public fwk::Worker< library::Op::Ptr >
+		: public fwk::Worker< eng::Op::Ptr >
 	{
 	public:
 		/** create the local server for the library whose dir is specified */
 		LocalLibraryServer(const std::string & dir, 
 						   const fwk::NotificationCenter::Ptr & nc)
-			: fwk::Worker< library::Op::Ptr >()
-			, m_library(db::Library::Ptr(new db::Library(dir, nc)))
+			: fwk::Worker< eng::Op::Ptr >()
+			, m_library(eng::Library::Ptr(new eng::Library(dir, nc)))
 			{
 			}
 
 	protected:
-		virtual void execute(const library::Op::Ptr & _op);
+		virtual void execute(const eng::Op::Ptr & _op);
 
 	private:
-		db::Library::Ptr m_library;
+		eng::Library::Ptr m_library;
 	};
 
 }
diff --git a/src/libraryclient/test_worker.cpp b/src/libraryclient/test_worker.cpp
index a7b8d08..4608c2e 100644
--- a/src/libraryclient/test_worker.cpp
+++ b/src/libraryclient/test_worker.cpp
@@ -28,10 +28,10 @@
 #include <boost/test/minimal.hpp>
 
 
-using namespace library;
+using namespace eng;
 using namespace libraryclient;
 
-void foo(const db::Library::Ptr &)
+void foo(const Library::Ptr &)
 {
 }
 
@@ -50,7 +50,7 @@ int test_main(int, char *[])
 		
 		BOOST_CHECK(w._tasks().empty());
 		
-		Op::Ptr p(new Op(0, boost::bind(&foo, db::Library::Ptr())));
+		Op::Ptr p(new Op(0, boost::bind(&foo, eng::Library::Ptr())));
 		w.schedule(p);
 	}
     return 0;
diff --git a/src/niepce/modules/darkroom/darkroommodule.cpp b/src/niepce/modules/darkroom/darkroommodule.cpp
index 3419eab..10c618d 100644
--- a/src/niepce/modules/darkroom/darkroommodule.cpp
+++ b/src/niepce/modules/darkroom/darkroommodule.cpp
@@ -31,10 +31,10 @@
 namespace darkroom {
 
 
-void DarkroomModule::set_image(const db::LibFile::Ptr & file)
+void DarkroomModule::set_image(const eng::LibFile::Ptr & file)
 {
     m_image->reload(file->path(), 
-                    file->fileType() == db::LibFile::FILE_TYPE_RAW,
+                    file->fileType() == eng::LibFile::FILE_TYPE_RAW,
                     file->orientation());
 /*    int w, h;
     w = m_imagecanvas->get_width();
diff --git a/src/niepce/modules/darkroom/darkroommodule.hpp b/src/niepce/modules/darkroom/darkroommodule.hpp
index e326ef3..4450e27 100644
--- a/src/niepce/modules/darkroom/darkroommodule.hpp
+++ b/src/niepce/modules/darkroom/darkroommodule.hpp
@@ -56,7 +56,7 @@ public:
 		{
 		}
 
-	void set_image(const db::LibFile::Ptr & file);
+	void set_image(const eng::LibFile::Ptr & file);
 
 protected:
 	virtual Gtk::Widget * buildWidget();
diff --git a/src/niepce/ui/filmstripcontroller.cpp b/src/niepce/ui/filmstripcontroller.cpp
index 28fd0d9..170d045 100644
--- a/src/niepce/ui/filmstripcontroller.cpp
+++ b/src/niepce/ui/filmstripcontroller.cpp
@@ -63,7 +63,7 @@ int FilmStripController::get_selected()
 		Gtk::TreeRow row = *(m_store->get_iter(path));
 		if(row) {
 			DBG_OUT("found row");
-            db::LibFile::Ptr libfile = row[m_store->columns().m_libfile];
+            eng::LibFile::Ptr libfile = row[m_store->columns().m_libfile];
             if(libfile) {
                 id = libfile->id();
             }
@@ -85,13 +85,13 @@ void FilmStripController::on_lib_notification(const framework::Notification::Ptr
 {
 	DBG_ASSERT(n->type() == niepce::NOTIFICATION_LIB, "wrong notification type");
 	if(n->type() == niepce::NOTIFICATION_LIB) {
-		db::LibNotification ln = boost::any_cast<db::LibNotification>(n->data());
+		eng::LibNotification ln = boost::any_cast<eng::LibNotification>(n->data());
 		switch(ln.type) {
-		case db::Library::NOTIFY_FOLDER_CONTENT_QUERIED:
-		case db::Library::NOTIFY_KEYWORD_CONTENT_QUERIED:
+		case eng::Library::NOTIFY_FOLDER_CONTENT_QUERIED:
+		case eng::Library::NOTIFY_KEYWORD_CONTENT_QUERIED:
 		{
-			db::LibFile::ListPtr l 
-				= boost::any_cast<db::LibFile::ListPtr>(ln.param);
+			eng::LibFile::ListPtr l 
+				= boost::any_cast<eng::LibFile::ListPtr>(ln.param);
 			DBG_OUT("received folder content file # %d", l->size());
 			
 			Glib::RefPtr<EogListStore> store(new EogListStore( *l ));
diff --git a/src/niepce/ui/imageliststore.cpp b/src/niepce/ui/imageliststore.cpp
index bf40cc7..749aca3 100644
--- a/src/niepce/ui/imageliststore.cpp
+++ b/src/niepce/ui/imageliststore.cpp
@@ -69,18 +69,18 @@ void ImageListStore::on_lib_notification(const fwk::Notification::Ptr &n)
     DBG_ASSERT(n->type() == niepce::NOTIFICATION_LIB, 
                "wrong notification type");
     if(n->type() == niepce::NOTIFICATION_LIB) {
-        db::LibNotification ln = boost::any_cast<db::LibNotification>(n->data());
+        eng::LibNotification ln = boost::any_cast<eng::LibNotification>(n->data());
         switch(ln.type) {
-        case db::Library::NOTIFY_FOLDER_CONTENT_QUERIED:
-        case db::Library::NOTIFY_KEYWORD_CONTENT_QUERIED:
+        case eng::Library::NOTIFY_FOLDER_CONTENT_QUERIED:
+        case eng::Library::NOTIFY_KEYWORD_CONTENT_QUERIED:
         {
-            db::LibFile::ListPtr l 
-                = boost::any_cast<db::LibFile::ListPtr>(ln.param);
+            eng::LibFile::ListPtr l 
+                = boost::any_cast<eng::LibFile::ListPtr>(ln.param);
             DBG_OUT("received folder content file # %d", l->size());
             Glib::RefPtr< Gtk::IconTheme > icon_theme(fwk::Application::app()->getIconTheme());
             clear();
             m_idmap.clear();
-            db::LibFile::List::const_iterator iter = l->begin();
+            eng::LibFile::List::const_iterator iter = l->begin();
             for( ; iter != l->end(); iter++ )
             {
                 Gtk::TreeModel::iterator riter = append();
@@ -97,7 +97,7 @@ void ImageListStore::on_lib_notification(const fwk::Notification::Ptr &n)
             getLibraryClient()->thumbnailCache().request(l);
             break;
         }
-        case db::Library::NOTIFY_METADATA_CHANGED:
+        case eng::Library::NOTIFY_METADATA_CHANGED:
         {
             std::tr1::array<int, 3> m = boost::any_cast<std::tr1::array<int, 3> >(ln.param);
             DBG_OUT("metadata changed");
@@ -106,13 +106,13 @@ void ImageListStore::on_lib_notification(const fwk::Notification::Ptr &n)
             if(iter != m_idmap.end()) {
                 row = *(iter->second);
                 //
-                db::LibFile::Ptr file = row[m_columns.m_libfile];
+                eng::LibFile::Ptr file = row[m_columns.m_libfile];
                 file->setMetaData(m[1], m[2]);
                 row[m_columns.m_libfile] = file;
             }
             break;
         }
-        case db::Library::NOTIFY_XMP_NEEDS_UPDATE:
+        case eng::Library::NOTIFY_XMP_NEEDS_UPDATE:
         {
             getLibraryClient()->processXmpUpdateQueue();
             break;
@@ -128,8 +128,8 @@ void ImageListStore::on_tnail_notification(const fwk::Notification::Ptr &n)
     DBG_ASSERT(n->type() == niepce::NOTIFICATION_THUMBNAIL, 
                "wrong notification type");
     if(n->type() == niepce::NOTIFICATION_THUMBNAIL) {
-        library::ThumbnailNotification tn 
-            = boost::any_cast<library::ThumbnailNotification>(n->data());
+        eng::ThumbnailNotification tn 
+            = boost::any_cast<eng::ThumbnailNotification>(n->data());
         std::map<int, Gtk::TreeIter>::iterator iter
             = m_idmap.find( tn.id );
         if(iter != m_idmap.end()) {
diff --git a/src/niepce/ui/imageliststore.hpp b/src/niepce/ui/imageliststore.hpp
index 992b68a..86ead88 100644
--- a/src/niepce/ui/imageliststore.hpp
+++ b/src/niepce/ui/imageliststore.hpp
@@ -54,7 +54,7 @@ public:
                 add(m_strip_thumb);
             }
         Gtk::TreeModelColumn<Glib::RefPtr<Gdk::Pixbuf> > m_pix;
-        Gtk::TreeModelColumn<db::LibFile::Ptr> m_libfile;
+        Gtk::TreeModelColumn<eng::LibFile::Ptr> m_libfile;
         Gtk::TreeModelColumn<Glib::RefPtr<Gdk::Pixbuf> > m_strip_thumb;
     };
 
diff --git a/src/niepce/ui/librarycellrenderer.cpp b/src/niepce/ui/librarycellrenderer.cpp
index e12df34..97735f5 100644
--- a/src/niepce/ui/librarycellrenderer.cpp
+++ b/src/niepce/ui/librarycellrenderer.cpp
@@ -193,7 +193,7 @@ LibraryCellRenderer::render_vfunc (const Glib::RefPtr<Gdk::Drawable>& window,
 	r.x += xpad;
 	r.y += ypad;
 
-	db::LibFile::Ptr file = m_libfileproperty.get_value();
+	eng::LibFile::Ptr file = m_libfileproperty.get_value();
 
 	Gdk::Color color;
 	if(flags & Gtk::CELL_RENDERER_SELECTED) {
@@ -219,16 +219,16 @@ LibraryCellRenderer::render_vfunc (const Glib::RefPtr<Gdk::Drawable>& window,
 //    DBG_OUT("the filetype: %i", file->fileType());
     
     switch(file->fileType()) {
-    case db::LibFile::FILE_TYPE_RAW:
+    case eng::LibFile::FILE_TYPE_RAW:
         emblem = m_raw_format_emblem;
         break;
-    case db::LibFile::FILE_TYPE_RAW_JPEG:
+    case eng::LibFile::FILE_TYPE_RAW_JPEG:
         emblem = m_rawjpeg_format_emblem;
         break;
-    case db::LibFile::FILE_TYPE_IMAGE:
+    case eng::LibFile::FILE_TYPE_IMAGE:
         emblem = m_img_format_emblem;
         break;
-    case db::LibFile::FILE_TYPE_VIDEO:
+    case eng::LibFile::FILE_TYPE_VIDEO:
         emblem = m_video_format_emblem;
         break;
     default:
@@ -244,17 +244,17 @@ LibraryCellRenderer::render_vfunc (const Glib::RefPtr<Gdk::Drawable>& window,
 
 
 
-Glib::PropertyProxy_ReadOnly<db::LibFile::Ptr> 	
+Glib::PropertyProxy_ReadOnly<eng::LibFile::Ptr> 	
 LibraryCellRenderer::property_libfile() const
 {
-	return Glib::PropertyProxy_ReadOnly<db::LibFile::Ptr>(this, "libfile");
+	return Glib::PropertyProxy_ReadOnly<eng::LibFile::Ptr>(this, "libfile");
 }
 
 
-Glib::PropertyProxy<db::LibFile::Ptr> 	
+Glib::PropertyProxy<eng::LibFile::Ptr> 	
 LibraryCellRenderer::property_libfile()
 {
-	return Glib::PropertyProxy<db::LibFile::Ptr>(this, "libfile");
+	return Glib::PropertyProxy<eng::LibFile::Ptr>(this, "libfile");
 }
 
 
diff --git a/src/niepce/ui/librarycellrenderer.hpp b/src/niepce/ui/librarycellrenderer.hpp
index f15550f..822e54b 100644
--- a/src/niepce/ui/librarycellrenderer.hpp
+++ b/src/niepce/ui/librarycellrenderer.hpp
@@ -51,12 +51,12 @@ public:
     int size() const
         { return m_size; }
 
-	Glib::PropertyProxy_ReadOnly<db::LibFile::Ptr> 	property_libfile() const;
-	Glib::PropertyProxy<db::LibFile::Ptr> 	property_libfile();
+	Glib::PropertyProxy_ReadOnly<eng::LibFile::Ptr> 	property_libfile() const;
+	Glib::PropertyProxy<eng::LibFile::Ptr> 	property_libfile();
 
 private:
     int                                 m_size;
-	Glib::Property<db::LibFile::Ptr>    m_libfileproperty;
+	Glib::Property<eng::LibFile::Ptr>    m_libfileproperty;
 
 	Cairo::RefPtr<Cairo::ImageSurface>  m_raw_format_emblem;
 	Cairo::RefPtr<Cairo::ImageSurface>  m_rawjpeg_format_emblem;
diff --git a/src/niepce/ui/librarymainviewcontroller.cpp b/src/niepce/ui/librarymainviewcontroller.cpp
index b230fe5..71cc9e5 100644
--- a/src/niepce/ui/librarymainviewcontroller.cpp
+++ b/src/niepce/ui/librarymainviewcontroller.cpp
@@ -43,17 +43,17 @@ void LibraryMainViewController::on_lib_notification(const fwk::Notification::Ptr
     DBG_ASSERT(n->type() == niepce::NOTIFICATION_LIB, 
                "wrong notification type");
     if(n->type() == niepce::NOTIFICATION_LIB) {
-        db::LibNotification ln = boost::any_cast<db::LibNotification>(n->data());
+        eng::LibNotification ln = boost::any_cast<eng::LibNotification>(n->data());
         switch(ln.type) {
-        case db::Library::NOTIFY_METADATA_QUERIED:
+        case eng::Library::NOTIFY_METADATA_QUERIED:
         {
-            db::LibMetadata::Ptr lm
-                = boost::any_cast<db::LibMetadata::Ptr>(ln.param);
+            eng::LibMetadata::Ptr lm
+                = boost::any_cast<eng::LibMetadata::Ptr>(ln.param);
             DBG_OUT("received metadata");
             m_metapanecontroller->display(lm->id(), lm.get());
             break;
         }
-        case db::Library::NOTIFY_METADATA_CHANGED:
+        case eng::Library::NOTIFY_METADATA_CHANGED:
         {
             DBG_OUT("metadata changed");
             std::tr1::array<int, 3> m = boost::any_cast<std::tr1::array<int, 3> >(ln.param);
@@ -142,7 +142,7 @@ void LibraryMainViewController::on_image_activated(int id)
     DBG_OUT("on image activated %d", id);
     Gtk::TreeIter iter = m_model->get_iter_from_id(id);
     if(iter) {
-        db::LibFile::Ptr libfile = (*iter)[m_model->columns().m_libfile];
+        eng::LibFile::Ptr libfile = (*iter)[m_model->columns().m_libfile];
         m_darkroom->set_image(libfile);
         m_mainview.activate_page(1);
     }
@@ -172,7 +172,7 @@ int LibraryMainViewController::get_selected()
         Gtk::TreeRow row = *(m_model->get_iter(path));
         if(row) {
             DBG_OUT("found row");
-            db::LibFile::Ptr libfile = row[m_model->columns().m_libfile];
+            eng::LibFile::Ptr libfile = row[m_model->columns().m_libfile];
             if(libfile) {
                 id = libfile->id();
             }
diff --git a/src/niepce/ui/niepcewindow.cpp b/src/niepce/ui/niepcewindow.cpp
index 37c2910..352443a 100644
--- a/src/niepce/ui/niepcewindow.cpp
+++ b/src/niepce/ui/niepcewindow.cpp
@@ -508,12 +508,12 @@ void NiepceWindow::on_lib_notification(const fwk::Notification::Ptr &n)
     DBG_ASSERT(n->type() == niepce::NOTIFICATION_LIB, 
                "wrong notification type");
     if(n->type() == niepce::NOTIFICATION_LIB) {
-        db::LibNotification ln = boost::any_cast<db::LibNotification>(n->data());
+        eng::LibNotification ln = boost::any_cast<eng::LibNotification>(n->data());
         switch(ln.type) {
-        case db::Library::NOTIFY_NEW_LIBRARY_CREATED:
+        case eng::Library::NOTIFY_NEW_LIBRARY_CREATED:
             create_initial_labels();
             break;
-        case db::Library::NOTIFY_ADDED_LABELS:
+        case eng::Library::NOTIFY_ADDED_LABELS:
         {
             eng::Label::ListPtr l 
                 = boost::any_cast<eng::Label::ListPtr>(ln.param);
@@ -524,7 +524,7 @@ void NiepceWindow::on_lib_notification(const fwk::Notification::Ptr &n)
             }
             break;
         }
-        case db::Library::NOTIFY_LABEL_CHANGED:
+        case eng::Library::NOTIFY_LABEL_CHANGED:
         {
             eng::Label::Ptr & l 
                 = boost::any_cast<eng::Label::Ptr &>(ln.param);
@@ -539,7 +539,7 @@ void NiepceWindow::on_lib_notification(const fwk::Notification::Ptr &n)
             }
             break;
         }
-        case db::Library::NOTIFY_LABEL_DELETED:
+        case eng::Library::NOTIFY_LABEL_DELETED:
         {
             int id = boost::any_cast<int>(ln.param);
             // TODO: will work as long as we have 5 labels or something.
diff --git a/src/niepce/ui/selectioncontroller.cpp b/src/niepce/ui/selectioncontroller.cpp
index 7af3eb4..6c78acb 100644
--- a/src/niepce/ui/selectioncontroller.cpp
+++ b/src/niepce/ui/selectioncontroller.cpp
@@ -115,7 +115,7 @@ void SelectionController::_selection_move(bool backwards)
         }
         if(iter) {
             // make sure the iterator is valid...
-            db::LibFile::Ptr libfile 
+            eng::LibFile::Ptr libfile 
                 = (*iter)[m_imageliststore->columns().m_libfile];
             selection = libfile->id();
 
@@ -156,7 +156,7 @@ void SelectionController::rotate(int angle)
 }
 
 
-bool SelectionController::_set_metadata(const std::string & undo_label, const db::LibFile::Ptr & file,
+bool SelectionController::_set_metadata(const std::string & undo_label, const eng::LibFile::Ptr & file,
                                         int meta, int old_value, int new_value)
 {
     fwk::UndoTransaction *undo = fwk::Application::app()->begin_undo(undo_label);
@@ -178,11 +178,11 @@ void SelectionController::set_label(int label)
     if(selection >= 0) {
         Gtk::TreeIter iter = m_imageliststore->get_iter_from_id(selection);
         if(iter) {
-            db::LibFile::Ptr file = (*iter)[m_imageliststore->columns().m_libfile];
+            eng::LibFile::Ptr file = (*iter)[m_imageliststore->columns().m_libfile];
             DBG_OUT("old label is %d", file->label());
             int old_value = file->label();
             _set_metadata(_("Set Label"), file, 
-                          MAKE_METADATA_IDX(db::META_NS_XMPCORE, db::META_XMPCORE_LABEL), 
+                          MAKE_METADATA_IDX(eng::META_NS_XMPCORE, eng::META_XMPCORE_LABEL), 
                           old_value, label);
             // we need to set the label here so that undo/redo works
             // consistently.
@@ -199,11 +199,11 @@ void SelectionController::set_rating(int rating)
     if(selection >= 0) {
         Gtk::TreeIter iter = m_imageliststore->get_iter_from_id(selection);
         if(iter) {
-            db::LibFile::Ptr file = (*iter)[m_imageliststore->columns().m_libfile];
+            eng::LibFile::Ptr file = (*iter)[m_imageliststore->columns().m_libfile];
             DBG_OUT("old rating is %d", file->rating());
             int old_value = file->rating();
             _set_metadata(_("Set Rating"), file, 
-                          MAKE_METADATA_IDX(db::META_NS_XMPCORE, db::META_XMPCORE_RATING), 
+                          MAKE_METADATA_IDX(eng::META_NS_XMPCORE, eng::META_XMPCORE_RATING), 
                           old_value, rating);
             // we need to set the rating here so that undo/redo works
             // consistently.
diff --git a/src/niepce/ui/selectioncontroller.hpp b/src/niepce/ui/selectioncontroller.hpp
index 982f0eb..dc949c0 100644
--- a/src/niepce/ui/selectioncontroller.hpp
+++ b/src/niepce/ui/selectioncontroller.hpp
@@ -95,7 +95,7 @@ private:
     libraryclient::LibraryClient::Ptr getLibraryClient();
 
     bool _set_metadata(const std::string & undo_label, 
-                       const db::LibFile::Ptr & file,
+                       const eng::LibFile::Ptr & file,
                        int meta, int old_value, int new_value);
     /** move the selection and emit the signal 
      * @param backwards true if the move is backwards.
diff --git a/src/niepce/ui/thumb-view/eog-thumb-view.cpp b/src/niepce/ui/thumb-view/eog-thumb-view.cpp
index 263a39c..295fb88 100644
--- a/src/niepce/ui/thumb-view/eog-thumb-view.cpp
+++ b/src/niepce/ui/thumb-view/eog-thumb-view.cpp
@@ -321,7 +321,7 @@ tb_on_drag_data_get_cb (GtkWidget        *widget,
 {
 	GList *list;
 	GList *node;
-	db::LibFile *image;
+	eng::LibFile *image;
 	const char *str;
 	gchar *uris = NULL;
 	gchar *tmp_str;
@@ -329,7 +329,7 @@ tb_on_drag_data_get_cb (GtkWidget        *widget,
 	list = eog_thumb_view_get_selected_images (EOG_THUMB_VIEW (widget));
 
 	for (node = list; node != NULL; node = node->next) {
-		image = static_cast<db::LibFile*>(node->data);
+		image = static_cast<eng::LibFile*>(node->data);
 		str = image->uri().c_str();
 		
 		/* build the "text/uri-list" string */
@@ -653,7 +653,7 @@ eog_thumb_view_get_selected_images (EogThumbView *tb)
 #if 0
 void
 eog_thumb_view_set_current_image (EogThumbView *tb, 
-								  const db::LibFile::Ptr &image,
+								  const eng::LibFile::Ptr &image,
 								  gboolean deselect_other)
 {
 	GtkTreePath *path;
diff --git a/src/niepce/ui/thumb-view/eog-thumb-view.hpp b/src/niepce/ui/thumb-view/eog-thumb-view.hpp
index 28ba6ef..5ff4fc0 100644
--- a/src/niepce/ui/thumb-view/eog-thumb-view.hpp
+++ b/src/niepce/ui/thumb-view/eog-thumb-view.hpp
@@ -80,7 +80,7 @@ void        eog_thumb_view_select_single 	    (EogThumbView *view,
 						     EogThumbViewSelectionChange change);
 
 void        eog_thumb_view_set_current_image	    (EogThumbView *view, 
-						     const db::LibFile::Ptr&     image,
+						     const eng::LibFile::Ptr&     image,
 						     gboolean     deselect_other);
 
 //void        eog_thumb_view_set_thumbnail_popup      (EogThumbView *view, 
diff --git a/src/niepce/ui/workspacecontroller.cpp b/src/niepce/ui/workspacecontroller.cpp
index 6687db9..d6c477a 100644
--- a/src/niepce/ui/workspacecontroller.cpp
+++ b/src/niepce/ui/workspacecontroller.cpp
@@ -72,37 +72,37 @@ namespace ui {
 	{
 		DBG_OUT("notification for workspace");
 		if(n->type() == niepce::NOTIFICATION_LIB) {
-			db::LibNotification ln = boost::any_cast<db::LibNotification>(n->data());
+			eng::LibNotification ln = boost::any_cast<eng::LibNotification>(n->data());
 			switch(ln.type) {
-			case db::Library::NOTIFY_ADDED_FOLDERS:
+			case eng::Library::NOTIFY_ADDED_FOLDERS:
 			{
-				db::LibFolder::ListPtr l 
-					= boost::any_cast<db::LibFolder::ListPtr>(ln.param);
+				eng::LibFolder::ListPtr l 
+					= boost::any_cast<eng::LibFolder::ListPtr>(ln.param);
 				DBG_OUT("received added folders # %d", l->size());
 				for_each(l->begin(), l->end(), 
 						 boost::bind(&WorkspaceController::add_folder_item, 
 									 this, _1));
 				break;
 			}
-			case db::Library::NOTIFY_ADDED_KEYWORD:
+			case eng::Library::NOTIFY_ADDED_KEYWORD:
 			{
-				db::Keyword::Ptr k
-					= boost::any_cast<db::Keyword::Ptr>(ln.param);
+				eng::Keyword::Ptr k
+					= boost::any_cast<eng::Keyword::Ptr>(ln.param);
 				DBG_ASSERT(k, "keyword must not be NULL");
 				add_keyword_item(k);
 				break;
 			}
-			case db::Library::NOTIFY_ADDED_KEYWORDS:
+			case eng::Library::NOTIFY_ADDED_KEYWORDS:
 			{
-				db::Keyword::ListPtr l
-					= boost::any_cast<db::Keyword::ListPtr>(ln.param);
+				eng::Keyword::ListPtr l
+					= boost::any_cast<eng::Keyword::ListPtr>(ln.param);
 				DBG_ASSERT(l, "keyword list must not be NULL");
 				for_each(l->begin(), l->end(), 
 						 boost::bind(&WorkspaceController::add_keyword_item, 
 									 this, _1));
 				break;
 			}
-			case db::Library::NOTIFY_FOLDER_COUNTED:
+			case eng::Library::NOTIFY_FOLDER_COUNTED:
 			{
 				std::pair<int,int> count(boost::any_cast<std::pair<int,int> >(ln.param));
 				DBG_OUT("count for folder %d is %d", count.first, count.second);
@@ -149,7 +149,7 @@ namespace ui {
 		}
 	}
 
-	void WorkspaceController::add_keyword_item(const db::Keyword::Ptr & k)
+	void WorkspaceController::add_keyword_item(const eng::Keyword::Ptr & k)
 	{
 		Gtk::TreeModel::iterator iter(add_item(m_treestore, m_keywordsNode->children(), 
 											   m_icons[ICON_KEYWORD], k->keyword(), k->id(), 
@@ -158,7 +158,7 @@ namespace ui {
 		m_keywordsidmap[k->id()] = iter;
 	}
 
-	void WorkspaceController::add_folder_item(const db::LibFolder::Ptr & f)
+	void WorkspaceController::add_folder_item(const eng::LibFolder::Ptr & f)
 	{
 		Gtk::TreeModel::iterator iter(add_item(m_treestore, m_folderNode->children(), 
 											   m_icons[ICON_ROLL], 
diff --git a/src/niepce/ui/workspacecontroller.hpp b/src/niepce/ui/workspacecontroller.hpp
index 2f2e7b8..7c920c5 100644
--- a/src/niepce/ui/workspacecontroller.hpp
+++ b/src/niepce/ui/workspacecontroller.hpp
@@ -89,9 +89,9 @@ namespace ui {
 		libraryclient::LibraryClient::Ptr getLibraryClient();
 
 		/** add a folder item to the treeview */
-		void add_folder_item(const db::LibFolder::Ptr & f);
+		void add_folder_item(const eng::LibFolder::Ptr & f);
 		/** add a keyword item to the treeview */
-		void add_keyword_item(const db::Keyword::Ptr & k);
+		void add_keyword_item(const eng::Keyword::Ptr & k);
 		/** add a tree item in the treeview 
 		 * @param treestore the treestore to add to
 		 * @param childrens the children subtree to add to



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