TizenRefApp-8668 [Gallery] Replace using namespace directives with 24/133524/1
authorIgor Nazarov <i.nazarov@samsung.com>
Mon, 12 Jun 2017 14:04:10 +0000 (17:04 +0300)
committerIgor Nazarov <i.nazarov@samsung.com>
Mon, 12 Jun 2017 14:17:43 +0000 (17:17 +0300)
declarations

Change-Id: I0fe7a8585867239e83a3607b5067677a111a56a3

31 files changed:
src/common.h
src/main.cpp
src/model/BaseJob.cpp
src/model/Gallery.cpp
src/model/GalleryAlbum.cpp
src/model/MediaItem.cpp
src/model/SoundManager.cpp
src/model/internal.cpp
src/presenters/AlertDialog.cpp
src/presenters/AtspiHighlightHelper.cpp
src/presenters/Instance.cpp
src/presenters/InstanceManager.cpp
src/presenters/MoreOptionsPresenter.cpp
src/presenters/NoContentPage.cpp
src/presenters/Page.cpp
src/presenters/Presenter.cpp
src/presenters/PreviewPage.cpp
src/presenters/ProcessingPresenter.cpp
src/presenters/SelectModePresenter.cpp
src/presenters/ThumbnailPage.cpp
src/presenters/VideoPlayerPage.cpp
src/presenters/ViewerPage.cpp
src/presenters/internal.cpp
src/resources.cpp
src/view/ImageGrid.cpp
src/view/ImageViewer.cpp
src/view/PageContent.cpp
src/view/TouchParser.cpp
src/view/common.h
src/view/helpers.cpp
ucl/inc/ucl/util/memory/macro.h

index 696be603302d37444e700deafe636aafb81a12c8..57d60ad118e3e7e83d528f9eedd2a77edeff4b1d 100644 (file)
 
 #include "internal.h"
 
+namespace gallery {
+
+       using ucl::UInt;
+
+       using ucl::Result;
+       using ucl::RES_OK;
+       using ucl::RES_FALSE;
+       using ucl::RES_FAIL;
+       using ucl::RES_INVALID_ARGUMENTS;
+       using ucl::RES_ILLEGAL_STATE;
+       using ucl::RES_NOT_SUPPORTED;
+       using ucl::RES_INVALID_DATA;
+       using ucl::RES_FATAL;
+
+       using ucl::isEmpty;
+       using ucl::isNotEmpty;
+       using ucl::toEina;
+
+       using ucl::RefCountObj;
+       using ucl::RefCountObjBase;
+       using ucl::SharedRef;
+       using ucl::WeakRef;
+
+       using ucl::makeShared;
+       using ucl::dynamicRefCast;
+
+       namespace util {
+
+               using ucl::util::makeUnique;
+       }
+}
+
 #endif // __GALLERY_COMMON_H__
index e548152229bc1b617ccd20a16486217b49272504..0165f6f7c5873ceb3ed320f1c4e7914e4ea4e257 100644 (file)
@@ -20,8 +20,8 @@
 
 #include "common.h"
 
-using namespace ucl;
-using namespace gallery;
+using ucl::UIApp;
+using gallery::InstanceManager;
 
 int main(int argc, char *argv[])
 {
index fb61c32cb7d1e8c4adeb342943d010d0b9d5a662..1a358fbc70a2ed904c3b80acfcaeeb4a87c592b1 100644 (file)
@@ -22,8 +22,6 @@
 
 namespace gallery {
 
-       using namespace ucl;
-
        BaseJob::BaseJob(const NotiHandler &onComplete,
                        const bool isCancelable) :
                m_onComplete(onComplete),
index 73c804d9b1a829852ffe00136a73d8e37218c34e..9e4fae8f588358faabce14bf89647a59e0483233 100644 (file)
@@ -22,8 +22,6 @@
 
 namespace gallery {
 
-       using namespace ucl;
-
        Gallery::Gallery() :
                m_isMediaDbConnected(false)
        {
index a560e636810350de290a61755e98eb733bc5b5be..fbe2ad6a958ee2133cd9d65d316bdcc500c5589d 100644 (file)
@@ -25,7 +25,7 @@
 
 namespace gallery { namespace { namespace impl {
 
-       using namespace ucl;
+       using ucl::TString;
 
        const auto CONDITION = TString("%s=%d").format(
                        MEDIA_TYPE, MEDIA_CONTENT_TYPE_IMAGE);
@@ -35,7 +35,7 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::MutexLock;
 
        GalleryAlbum::GalleryAlbum() :
                m_pid(getpid()),
index e0895153b42d37d1cba43a0bbdd8217d4cc6889f..6a95ac1adf052e52bac509c9cfa9a8084f2541b7 100644 (file)
@@ -26,7 +26,7 @@
 
 namespace gallery { namespace { namespace impl {
 
-       using namespace ucl;
+       using ucl::AutoHandle;
 
        const std::string MIME_PREFIX_IMAGE {"image/"};
        const std::string MIME_PREFIX_VIDEO {"video/"};
@@ -56,7 +56,7 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::MutexLock;
 
        // MediaItem::Remover //
 
@@ -420,7 +420,7 @@ namespace gallery {
                        return RES_FALSE;
                }
 
-               auto cbProxy = ucl::util::makeUnique(new ThumbCbProxy{this, cb});
+               auto cbProxy = util::makeUnique(new ThumbCbProxy{this, cb});
 
                {
                        MutexLock lock(getMediaMutex());
index b540d797299290ccccb51fb09584ff1d95989a3d..efdf651e4c0e6891e856ead4babf89894a5520ac 100644 (file)
@@ -20,8 +20,6 @@
 
 namespace gallery {
 
-       using namespace ucl;
-
        SoundManagerSRef SoundManager::newInstance()
        {
                auto result = makeShared<SoundManager>();
index de6f9a22b2b14ae603940673eb358ebf0a3796f8..9f0e5cf22ea4f432fd75255f6e27c0d89808e18a 100644 (file)
@@ -28,7 +28,7 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::Mutex;
 
        Mutex &getMediaMutex()
        {
index 0a23f4855cb8dce7b8430e71be0cc4bbf3be5c36..85ec84b278e8e45a87c446454484135d8a11ad95 100644 (file)
@@ -21,8 +21,6 @@
 
 namespace gallery { namespace { namespace impl {
 
-       using namespace ucl;
-
        constexpr EoDataKey BTN_EVENT_DATA {"gallery,btn,event,data"};
 
        constexpr ElmStyle POPUP_STYLE {"circle"};
@@ -54,7 +52,9 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::Layout;
+
+       using ucl::PART_TITLE;
 
        // AlertDialog::Builder //
 
index feac2d2e57234fe874ed8b705da111a11390d417..8e6ae07f61d92316f3fc4c1853bdb846c4d6707e 100644 (file)
 
 namespace gallery { namespace { namespace impl {
 
-       using namespace ucl;
-
        constexpr EoDataKey ATSPI_HELPER_DATA {"gallery,atspi,highlight,helper"};
 }}}
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::AtspiGestureEventInfo;
+
+       using ucl::ATSPI_ON_GESTURE;
 
        AtspiHighlightHelperSRef AtspiHighlightHelper::newInstance(
                        ElmWidget &rootWidget)
index f060c0ffd5f83e556af741cc14bd2083b3d740ae..636bfc45b0dae382902f56cf9bdd7aa3d98473d2 100644 (file)
@@ -36,7 +36,13 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::SysEvent;
+       using ucl::SysEventProvider;
+       using ucl::IInstanceContext;
+       using ucl::getResPath;
+
+       using ucl::Theme;
+       using ucl::Naviframe;
 
        Instance::Instance(RefCountObjBase &rc,
                        SysEventProvider &sysEventProvider) :
index 6aabaef4ebf333ad582059a77829a97541091ad6..826362efce4e83414115b7dfdda40d258069e67b 100644 (file)
 
 #include "presenters/Instance.h"
 
+#include "common.h"
+
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::AppParam;
+       using ucl::AppParams;
+       using ucl::IInstanceSRef;
 
        InstanceManager::InstanceManager() :
                InstanceManagerBase(AppParams().
index 067753a5011ed35bbc827978b187559615b9db71..c718ff986d6b47ecbcd5feeda5ff129b1ca83ccb 100644 (file)
@@ -22,8 +22,6 @@
 
 namespace gallery { namespace { namespace impl {
 
-       using namespace ucl;
-
        constexpr SmartEvent MORE_OPENED {"more,option,opened"};
        constexpr SmartEvent MORE_CLOSED {"more,option,closed"};
        constexpr SmartEvent MORE_ITEM_CLICKED {"item,clicked"};
@@ -49,7 +47,7 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::Layout;
 
        // MoreOptionsPresenter::Builder //
 
index 5b6c9c71044851d75fbe9e39433468a390b8167f..9a57ee6804c9c63df8f041aea5c43f081060023b 100644 (file)
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::Layout;
+       using ucl::NaviframeSRef;
+
+       using ucl::LAYOUT_NO_CONTENTS;
+       using ucl::PART_TITLE;
 
        // NoContentPage::Builder //
 
index 24c6bbd7372ace41d6f594f4bff174992710f03b..787eb6f5852926e5e212d04ccb2a6e28d1823177 100644 (file)
 
 namespace gallery { namespace { namespace impl {
 
-       using namespace ucl;
-
        constexpr SmartEvent TOP_PAGE_CHANGED {"ucl,top,page,changed"};
 }}}
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::NaviItem;
+       using ucl::NaviframeSRef;
+
+       using ucl::NAVI_TRANSITION_STARTED;
+       using ucl::NAVI_TRANSITION_FINISHED;
 
        Page::Page(RefCountObjBase &rc, const NaviframeSRef &navi,
                        const ExitRequestHandler onExitRequest) :
index 814c4ac675282f3f3aa329330d965efec91c418c..7d86b0602882c4281ab15082c8b6fbadbca8c345 100644 (file)
 
 namespace gallery { namespace { namespace impl {
 
-       using namespace ucl;
-
        constexpr SmartEvent ACTIVATE_BY {"gallery,activate,by"};
        constexpr SmartEvent DEACTIVATE_BY {"gallery,deactivate,by"};
 }}}
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::Window;
 
        Presenter::Presenter(RefCountObjBase &rc) :
                RefCountAware(&rc),
index 13f96aee66160f07bb10a1dd835af5945b21c880..c582d54103a241c787e4ff76a1dc30bda647dff2 100644 (file)
@@ -35,7 +35,7 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::NaviframeSRef;
 
        // PreviewPage::Builder //
 
index 390b4844df66702e20166587824b29bbd7410db8..4eea1d4e6d4313a7534661ac1e018b0c7c548517 100644 (file)
@@ -20,8 +20,6 @@
 
 namespace gallery { namespace { namespace impl {
 
-       using namespace ucl;
-
        constexpr auto IDLE_WAIT_TIME_SEC = 0.2;
        constexpr auto PROCESSING_MIN_TIME_SEC = 0.5;
 
@@ -49,7 +47,9 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::Layout;
+
+       using ucl::PART_TEXT;
 
        // ProcessingPresenter::Builder //
 
index c6a72f76e372924c97fd1bf95c0ea4086a5df782..7b2e02f843382e6b6f9e57c71de6e120a61c27c7 100644 (file)
@@ -23,8 +23,6 @@
 
 namespace gallery { namespace { namespace impl {
 
-       using namespace ucl;
-
        const TString SELECT_BTN_TEXT_FMT {"%d"};
 
        constexpr ElmStyle SELECT_POPUP_STYLE {"select_mode"};
@@ -37,7 +35,7 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::WidgetItem;
 
        // SelectModePresenter::Builder //
 
index 9cb4eb5439e9271a9f7f59f3c201a8b737109e7f..b3a392c2df60a8b1a63a31c0ba5eb7780f36b345 100644 (file)
@@ -35,7 +35,7 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::NaviframeSRef;
 
        // ThumbnailPage::Builder //
 
index bd4a8c94ba28132e5774b6e041aadcfc138c34b8..bab03b6f91e4df32d48d2186321881e35655f381 100644 (file)
@@ -25,8 +25,6 @@
 
 namespace gallery { namespace { namespace impl {
 
-       using namespace ucl;
-
        constexpr auto AUTO_START_TIMEOUT_SEC = 0.3;
        constexpr auto CONTROLS_PLAYBACK_HIDE_TIMEOUT_SEC = 3.0;
        constexpr auto CONTROLS_PAUSE_HIDE_TIMEOUT_SEC = 6.0;
@@ -76,7 +74,12 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::AutoAppCtrl;
+
+       using ucl::Layout;
+       using ucl::NaviframeSRef;
+       using ucl::StyledWidgetSRef;
+       using ucl::WidgetEventHandler;
 
        // VideoPlayerPage::Builder //
 
index 5dcd31d959940fed0c601cddbd1c4dedbdcc1adf..047de81815d58ed84a075dbeab45d9b25629a44a 100644 (file)
@@ -28,7 +28,7 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::NaviframeSRef;
 
        // ViewerPage::Builder //
 
@@ -226,7 +226,7 @@ namespace gallery {
                m_imageViewer->setLowResImagePath(path);
        }
 
-       void ViewerPage::onZoomEnd(ucl::Widget &widget, void *eventInfo)
+       void ViewerPage::onZoomEnd(Widget &widget, void *eventInfo)
        {
                if (m_exitOnZoomOut && m_imageViewer->isZoomedOut()) {
                        requestExit();
index 33cf63f268e4a1771dfeee8bd370779f1f317e7d..207fdb18d53cf3949ee339103189ab01c0ee55a8 100644 (file)
 
 namespace gallery { namespace { namespace impl {
 
-       using namespace ucl;
-
        constexpr EoDataKey INSTANCE_PTR {"gallery,instance,data,ptr"};
 }}}
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::Window;
 
-       void setInstancePaused(ucl::Window &win, const bool value)
+       void setInstancePaused(Window &win, const bool value)
        {
                win.setData(impl::INSTANCE_PTR, reinterpret_cast<void *>(value));
                win.callEvent((value ? INSTANCE_PAUSED : INSTANCE_RESUMED), nullptr);
        }
 
-       bool isInstancePaused(const ucl::Window &win)
+       bool isInstancePaused(const Window &win)
        {
                return (reinterpret_cast<intptr_t>(
                                win.getData(impl::INSTANCE_PTR)) != 0);
index d3af53b8fd965009d44ed76d8510beb88df93779..83291cdb3e8f83e8a5f3b8e68d83e9fc4a5b751a 100644 (file)
 
 namespace gallery {
 
+       using ucl::TString;
+
        // TODO replace with IDS in the future
 
-       const ucl::TString STR_APP_NAME {"Gallery"};
-       const ucl::TString STR_NO_PHOTOS {"No photos"};
-       const ucl::TString STR_SELECT_ALL {"Select all"};
-       const ucl::TString STR_DESELECT_ALL {"Deselect all"};
-       const ucl::TString STR_DELETE {"Delete"};
-       const ucl::TString STR_DELETE_CAPS {"DELETE"};
-       const ucl::TString STR_DELETE_1_PHOTO {"Delete 1 photo?"};
-       const ucl::TString STR_DELETE_N_PHOTO {"Delete %d photo?"};
-       const ucl::TString STR_DELETING {"Deleting..."};
-       const ucl::TString STR_DELETED {"Deleted."};
-       const ucl::TString STR_FAILED {"Failed."};
-       const ucl::TString STR_SAVE_TO_GEAR {"Save to Gear"};
-       const ucl::TString STR_SAVING {"Saving..."};
-       const ucl::TString STR_SAVED {"Saved."};
+       const TString STR_APP_NAME {"Gallery"};
+       const TString STR_NO_PHOTOS {"No photos"};
+       const TString STR_SELECT_ALL {"Select all"};
+       const TString STR_DESELECT_ALL {"Deselect all"};
+       const TString STR_DELETE {"Delete"};
+       const TString STR_DELETE_CAPS {"DELETE"};
+       const TString STR_DELETE_1_PHOTO {"Delete 1 photo?"};
+       const TString STR_DELETE_N_PHOTO {"Delete %d photo?"};
+       const TString STR_DELETING {"Deleting..."};
+       const TString STR_DELETED {"Deleted."};
+       const TString STR_FAILED {"Failed."};
+       const TString STR_SAVE_TO_GEAR {"Save to Gear"};
+       const TString STR_SAVING {"Saving..."};
+       const TString STR_SAVED {"Saved."};
 }
index e7aa0544a6c5c38636a836f6b6e0afd2210ac9f6..9b24547573acab28a994ad7ffe8782077edf1fe2 100644 (file)
@@ -28,8 +28,6 @@
 
 namespace gallery { namespace { namespace impl {
 
-       using namespace ucl;
-
        // Related to ImageGrid //
        const TString SLOT_PART_FMT {"swallow.cell_%d"};
 
@@ -76,7 +74,10 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::Layout;
+
+       using ucl::Timeout;
+       using ucl::ceilDiv;
 
        // ImageGrid::Builder //
 
@@ -1428,7 +1429,7 @@ namespace gallery {
                for (int i = m_slotCount; i < newSlotCount; ++i) {
                        const bool isOdd = ((m_beginSlotIndex + i) & 1);
 
-                       auto slot = ucl::util::makeUnique(new Slot(*this, isOdd));
+                       auto slot = util::makeUnique(new Slot(*this, isOdd));
 
                        if (m_slotSize == 0) {
                                UCL_ASSERT(!isOdd, "Must be even!");
index 6d5e0d6c8206e6f3762e4ec2eca147a39d79cb33..5e90e416e041df4f3805724d5de18d8ee589af78 100644 (file)
@@ -27,7 +27,7 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::LAYOUT_DEFAULT;
 
        // ImageViewer::Builder //
 
index 6d9f43e2e5459c71770cb7753c557c4099cf5e03..39c2505cca00e9299f7da97c6456c968a872ef61 100644 (file)
@@ -20,8 +20,6 @@
 
 namespace gallery { namespace { namespace impl {
 
-       using namespace ucl;
-
        constexpr LayoutTheme LAYOUT_MORE_OPTIONS
                        {"layout", "gallery", "more_options"};
 
@@ -54,7 +52,12 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
+       using ucl::Layout;
+       using ucl::LayoutSRef;
+
+       using ucl::PART_BUTTON;
+       using ucl::PART_CONTENT;
+       using ucl::PART_ICON;
 
        // PageContent::Builder //
 
@@ -89,7 +92,7 @@ namespace gallery {
        // PageContent //
 
        PageContent::PageContent(RefCountObjBase &rc,
-                       const ucl::LayoutSRef &layout, const int flags) :
+                       const LayoutSRef &layout, const int flags) :
                ElmWidget(&rc, *layout, true),
                m_moreOptions(layout)
        {
index 119a7ebc6b21b8b6abaf0034d067360c04f16c8a..ecda732b304a3eb9468a367d3882f96d34ac9dd9 100644 (file)
@@ -28,8 +28,6 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery {
 
-       using namespace ucl;
-
        TouchParser::TouchParser(RefCountObjBase &rc, Widget &eventSource) :
                RefCountAware(&rc),
                m_holdTimer(nullptr),
index b6bcb12961ba6532672a0e166ad15f57beac99a9..d56f144e282483b7700d122bfb4405cb447dc154 100644 (file)
@@ -17,6 +17,7 @@
 #ifndef __GALLERY_VIEW_COMMON_H__
 #define __GALLERY_VIEW_COMMON_H__
 
+#include "ucl/gui/StyledWidget.h"
 #include "ucl/gui/stdTheme.h"
 #include "ucl/gui/helpers.h"
 
 
 namespace gallery {
 
+       using ucl::EdjePart;
+       using ucl::EdjeDataKey;
+       using ucl::EdjeSignal;
+       using ucl::EdjeSignalSrc;
+       using ucl::ElmStyle;
+       using ucl::SmartEvent;
+       using ucl::EoDataKey;
+       using ucl::LayoutTheme;
+       using ucl::WidgetEvent;
+       using ucl::WidgetARHint;
+
+       using ucl::TString;
+
+       UCL_USING_REF_ALIASES(ucl::Widget);
+       UCL_USING_REF_ALIASES(ucl::ElmWidget);
+       UCL_USING_REF_ALIASES(ucl::EdjeWidget);
+       UCL_USING_REF_ALIASES(ucl::StyledWidget);
+
        constexpr ucl::SmartEvent BTN_CLICKED {"clicked"};
        constexpr ucl::SmartEvent POPUP_DISMISSED {"dismissed"};
 
index 9add4e70f7bef7b20db0c4b3f56ab9c26768da4b..2a9fe7fdc7626f331c0cd28200bfe0606de6e57b 100644 (file)
@@ -25,8 +25,6 @@
 
 namespace gallery { namespace { namespace impl {
 
-       using namespace ucl;
-
        constexpr EoDataKey CIRCLE_SURFACE {"gallery,eext,circle,surface"};
 
        constexpr LayoutTheme LAYOUT_FAKE_ACCESS_OBJECT
@@ -35,7 +33,8 @@ namespace gallery { namespace { namespace impl {
 
 namespace gallery { namespace util {
 
-       using namespace ucl;
+       using ucl::Layout;
+       using ucl::Naviframe;
 
        Result createCircleSurface(Naviframe &navi)
        {
@@ -106,8 +105,6 @@ namespace gallery { namespace util {
 
 namespace gallery {
 
-       using namespace ucl;
-
        void addRotaryEventHandler(Eext_Rotary_Handler_Cb func, void *data)
        {
                eext_rotary_event_handler_add(func, data);
index 6818ef965b53cce1efd8ff7eb2f156211e6e37a5..b97175a1886e6eba3903c05162608f3ffa63d8ae 100644 (file)
                using CLASS_NAME##SCRef = ::ucl::SharedRef<const CLASS_NAME>; \
                using CLASS_NAME##WCRef = ::ucl::WeakRef<const CLASS_NAME>
 
+#define UCL_USING_REF_ALIASES(CLASS_NAME) \
+               using CLASS_NAME; \
+               using CLASS_NAME##SRef; \
+               using CLASS_NAME##WRef; \
+               using CLASS_NAME##SCRef; \
+               using CLASS_NAME##WCRef; \
+
 #endif // __UCL_UTIL_MEMORY_MACRO_H__