2 // Open Service Platform
3 // Copyright (c) 2012 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 FWebCtrlHitElementResult.cpp
20 * @brief The file contains the definition of HitElementResult class.
22 * The file contains the definition of HitElementResult class.
25 #include <FBaseResult.h>
26 #include <FBaseSysLog.h>
27 #include <FGrpBitmap.h>
28 #include <FWebCtrlHitElementResult.h>
29 #include "FWebCtrl_HitElementResultImpl.h"
32 using namespace Tizen::Base;
33 using namespace Tizen::Base::Collection;
34 using namespace Tizen::Graphics;
37 namespace Tizen { namespace Web { namespace Controls
41 HitElementResult::HitElementResult(void)
42 : __pHitElementResultImpl(new (std::nothrow) _HitElementResultImpl())
44 SysTryReturnVoidResult(NID_WEB_CTRL, __pHitElementResultImpl, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
48 HitElementResult::~HitElementResult(void)
50 delete __pHitElementResultImpl;
51 __pHitElementResultImpl = null;
56 HitElementResult::GetTagName(void) const
58 SysAssertf(__pHitElementResultImpl != null, "Not yet constructed. Construct() should be called before use.");
60 return __pHitElementResultImpl->GetTagName();
65 HitElementResult::GetAttributeValue(const String& attributeName) const
67 SysAssertf(__pHitElementResultImpl != null, "Not yet constructed. Construct() should be called before use.");
69 SysLog(NID_WEB_CTRL, "The current value of attributeName is %ls", attributeName.GetPointer());
71 return __pHitElementResultImpl->GetAttributeValue(attributeName);
76 HitElementResult::GetContent(void) const
78 SysAssertf(__pHitElementResultImpl != null, "Not yet constructed. Construct() should be called before use.");
80 return __pHitElementResultImpl->GetContent();
85 HitElementResult::GetUrl(void) const
87 SysAssertf(__pHitElementResultImpl != null, "Not yet constructed. Construct() should be called before use.");
89 return __pHitElementResultImpl->GetUrl();
94 HitElementResult::GetImage(void) const
96 SysAssertf(__pHitElementResultImpl != null, "Not yet constructed. Construct() should be called before use.");
98 return __pHitElementResultImpl->GetImage();
103 HitElementResult::HasImage(void) const
105 SysAssertf(__pHitElementResultImpl != null, "Not yet constructed. Construct() should be called before use.");
107 return __pHitElementResultImpl->HasImage();
112 HitElementResult::HasUrl(void) const
114 SysAssertf(__pHitElementResultImpl != null, "Not yet constructed. Construct() should be called before use.");
116 return __pHitElementResultImpl->HasUrl();
120 }}} // Tizen::Web::Controls