2 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file CertificateSelectorFrame.cpp
19 * @brief This is the implementation for the %CertificateSelectorFrame class.
22 #include <unique_ptr.h>
23 #include "CertificateSelectorForm.h"
24 #include "CertificateSelectorFrame.h"
26 using namespace Tizen::Base;
27 using namespace Tizen::Ui;
28 using namespace Tizen::Ui::Controls;
30 CertificateSelectorFrame::CertificateSelectorFrame(void)
35 CertificateSelectorFrame::~CertificateSelectorFrame(void)
40 CertificateSelectorFrame::SetRequestId(RequestId reqId)
46 CertificateSelectorFrame::OnInitializing(void)
51 std::unique_ptr<CertificateSelectorForm> pCertificateSelectorForm(new (std::nothrow) CertificateSelectorForm());
52 TryReturnResult(pCertificateSelectorForm, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY
53 , "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
55 AppAssertf(__reqId > -1, "The request ID is invalid.");
56 r = pCertificateSelectorForm->Initialize(__reqId);
57 TryReturnResult(!IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
59 pForm = pCertificateSelectorForm.release();
61 r = AddControl(*pForm);
62 TryReturnResult(!IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
64 r = SetCurrentForm(*pForm);
65 TryReturnResult(!IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
67 pForm->Invalidate(true);
73 CertificateSelectorFrame::OnTerminating(void)