From: Igor Nazarov Date: Mon, 12 Jun 2017 10:35:12 +0000 (+0300) Subject: TizenRefApp-8667 [Gallery] Replace forward declaration on header include X-Git-Tag: submit/tizen/20170703.071445~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=58d7c696f309230e2e7ba6a1265df81fa88f291f;p=profile%2Fwearable%2Fapps%2Fnative%2Fgallery.git TizenRefApp-8667 [Gallery] Replace forward declaration on header include Change-Id: I8e6781dae1e7f350609e9f64468cdc1c35ea2c33 --- diff --git a/inc/model/Gallery.h b/inc/model/Gallery.h index e3f994d..1a711f9 100644 --- a/inc/model/Gallery.h +++ b/inc/model/Gallery.h @@ -17,10 +17,12 @@ #ifndef __GALLERY_MODEL_GALLERY_H__ #define __GALLERY_MODEL_GALLERY_H__ -#include "types.h" +#include "IMediaAlbum.h" namespace gallery { + UCL_DECLARE_REF_ALIASES(Gallery); + class Gallery final : public ucl::NonCopyable { public: static GallerySRef newInstance(); diff --git a/inc/model/IJob.h b/inc/model/IJob.h index 66fc5ce..8c7d56e 100644 --- a/inc/model/IJob.h +++ b/inc/model/IJob.h @@ -21,6 +21,8 @@ namespace gallery { + UCL_DECLARE_REF_ALIASES(IJob); + class IJob : public ucl::Polymorphic { public: virtual ucl::Result getResult() const = 0; diff --git a/inc/model/IMediaAlbum.h b/inc/model/IMediaAlbum.h index 81db759..80eb222 100644 --- a/inc/model/IMediaAlbum.h +++ b/inc/model/IMediaAlbum.h @@ -17,10 +17,12 @@ #ifndef __GALLERY_MODEL_I_MEDIA_ALBUM_H__ #define __GALLERY_MODEL_I_MEDIA_ALBUM_H__ -#include "types.h" +#include "MediaItem.h" namespace gallery { + UCL_DECLARE_REF_ALIASES(IMediaAlbum); + class IMediaAlbum : public ucl::Polymorphic { public: using EachCb = ucl::Delegate; diff --git a/inc/model/MediaItem.h b/inc/model/MediaItem.h index 16ce969..20d2a3f 100644 --- a/inc/model/MediaItem.h +++ b/inc/model/MediaItem.h @@ -17,10 +17,20 @@ #ifndef __GALLERY_MODEL_MEDIA_ITEM_H__ #define __GALLERY_MODEL_MEDIA_ITEM_H__ -#include "types.h" +#include + +#include + +#include "ucl/misc/AutoHandle.h" + +#include "IJob.h" namespace gallery { + UCL_DECLARE_REF_ALIASES(MediaItem); + + using MediaItems = std::vector; + class MediaItem : public ucl::Polymorphic { public: using ThumbnailPathGetCb = diff --git a/inc/model/types.h b/inc/model/types.h index 181b26b..87beb8f 100644 --- a/inc/model/types.h +++ b/inc/model/types.h @@ -17,12 +17,6 @@ #ifndef __GALLERY_MODEL_TYPES_H__ #define __GALLERY_MODEL_TYPES_H__ -#include - -#include - -#include "ucl/misc/AutoHandle.h" - #include "../types.h" namespace gallery { @@ -34,16 +28,6 @@ namespace gallery { MUSIC, OTHERS }; - - UCL_DECLARE_REF_ALIASES(IJob); - - UCL_DECLARE_REF_ALIASES(Gallery); - - UCL_DECLARE_REF_ALIASES(IMediaAlbum); - - UCL_DECLARE_REF_ALIASES(MediaItem); - - using MediaItems = std::vector; } #endif // __GALLERY_MODEL_TYPES_H__ diff --git a/inc/presenters/AlertDialog.h b/inc/presenters/AlertDialog.h index 7b8e843..59274a2 100644 --- a/inc/presenters/AlertDialog.h +++ b/inc/presenters/AlertDialog.h @@ -24,6 +24,8 @@ namespace gallery { + UCL_DECLARE_REF_ALIASES(AlertDialog); + class AlertDialog final : public Presenter, public ucl::IDisposable { public: diff --git a/inc/presenters/IMoreOptionsListener.h b/inc/presenters/IMoreOptionsListener.h deleted file mode 100644 index e8e61b6..0000000 --- a/inc/presenters/IMoreOptionsListener.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2017 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.1 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://floralicense.org/license/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __GALLERY_PRESENTERS_MORE_OPTIONS_LISTENER_H__ -#define __GALLERY_PRESENTERS_MORE_OPTIONS_LISTENER_H__ - -#include "types.h" - -namespace gallery { - - class IMoreOptionsListener : public ucl::Polymorphic { - public: - virtual void onMoreOptionClicked(MoreOptionsPresenter &sender, - const MoreOption &option) = 0; - virtual void onMoreOptionSelected(MoreOptionsPresenter &sender, - const MoreOption &option) {}; - virtual void onMoreOptionsOpened(MoreOptionsPresenter &sender) {}; - virtual void onMoreOptionsClosed(MoreOptionsPresenter &sender) {}; - }; -} - -#endif // __GALLERY_PRESENTERS_MORE_OPTIONS_LISTENER_H__ diff --git a/inc/presenters/ISelectModeListener.h b/inc/presenters/ISelectModeListener.h deleted file mode 100644 index 35fef58..0000000 --- a/inc/presenters/ISelectModeListener.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2017 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.1 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://floralicense.org/license/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __GALLERY_PRESENTERS_SELECT_MODE_LISTENER_H__ -#define __GALLERY_PRESENTERS_SELECT_MODE_LISTENER_H__ - -#include "types.h" - -namespace gallery { - - class ISelectModeListener : public ucl::Polymorphic { - public: - virtual void onSelectModeEvent(int event) = 0; - }; -} - -#endif // __GALLERY_PRESENTERS_SELECT_MODE_LISTENER_H__ diff --git a/inc/presenters/Instance.h b/inc/presenters/Instance.h index a9c949a..bdd20f6 100644 --- a/inc/presenters/Instance.h +++ b/inc/presenters/Instance.h @@ -19,11 +19,13 @@ #include "ucl/appfw/IInstance.h" #include "ucl/appfw/IInstanceAppControlExt.h" +#include "ucl/appfw/SysEventProvider.h" #include "ucl/gui/Theme.h" #include "ucl/gui/Naviframe.h" -#include "types.h" +#include "model/Gallery.h" +#include "Page.h" namespace gallery { diff --git a/inc/presenters/MoreOptionsPresenter.h b/inc/presenters/MoreOptionsPresenter.h index 8b34e68..c959b3c 100644 --- a/inc/presenters/MoreOptionsPresenter.h +++ b/inc/presenters/MoreOptionsPresenter.h @@ -17,28 +17,53 @@ #ifndef __GALLERY_PRESENTERS_MORE_OPTIONS_PRESENTER_H__ #define __GALLERY_PRESENTERS_MORE_OPTIONS_PRESENTER_H__ +#include + #include "ucl/misc/HashMap.h" #include "Presenter.h" namespace gallery { + UCL_DECLARE_REF_ALIASES(MoreOptionsPresenter); + class MoreOptionsPresenter final : public Presenter { public: + UCL_DECLARE_REF_ALIASES(IListener); + + struct Option { + int id; + ucl::TString text; + ucl::TString subText; + ucl::LayoutTheme iconTheme; + }; + + using MoreOptions = std::list