2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiCtrl_ProgressPopupEvent.cpp
20 * @brief This is the implementation for the ActionEvent class.
24 #include <FBaseErrors.h>
25 #include <FBaseSysLog.h>
26 #include "FUiCtrl_IProgressPopupEventListener.h"
27 #include "FUiCtrl_ProgressPopupEvent.h"
30 using namespace Tizen::Base;
31 using namespace Tizen::Base::Runtime;
34 namespace Tizen { namespace Ui { namespace Controls
38 class _OSP_EXPORT_ _ProgressPopupEventArg
43 _ProgressPopupEventArg(void);
45 virtual ~_ProgressPopupEventArg(void);
47 }; // _ProgressPopupEventArg
50 _ProgressPopupEventArg::_ProgressPopupEventArg(void)
55 _ProgressPopupEventArg::~_ProgressPopupEventArg(void)
61 _ProgressPopupEvent::_ProgressPopupEvent(const _Control& source)
64 result r = _Event::Initialize();
70 SetLastResult(E_SUCCESS);
74 _ProgressPopupEvent::~_ProgressPopupEvent(void)
80 _ProgressPopupEvent::CreateInstanceN(const _Control& source)
82 _ProgressPopupEvent* pProgressPopupEvent = new (std::nothrow) _ProgressPopupEvent(source);
83 SysTryReturn(NID_UI_CTRL, pProgressPopupEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
85 if (IsFailed(GetLastResult()))
90 return pProgressPopupEvent;
93 delete pProgressPopupEvent;
98 _ProgressPopupEvent::GetSource(void) const
104 _ProgressPopupEvent::FireImpl(IEventListener& pListener, const IEventArg& arg)
106 // cast to _IProgressPopupEventListener
107 _IProgressPopupEventListener* pProgressPopupListener = dynamic_cast <_IProgressPopupEventListener*>(&pListener);
108 SysTryReturnVoidResult(NID_UI_CTRL, pProgressPopupListener != null, E_INVALID_ARG,
109 "[E_INVALID_ARG] The invalid listener was given.\n");
111 // call progresspopup event listener method
112 pProgressPopupListener->OnProgressPopupCanceled();
116 _ProgressPopupEvent::CreateProgressPopupEventArgN(void)
118 _ProgressPopupEventArg* pEventArg = new (std::nothrow) _ProgressPopupEventArg();
119 SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
124 }}} // Tizen::Ui::Controls