3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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: IntBookmark.cpp
20 *@brief: Used to define bookmark
23 #include "IntBookmarkData.h"
25 using namespace Tizen::Base;
27 BookmarkData::BookmarkData(void)
29 , __bookmarkType(BOOKMARK_TYPE_URL)
36 __createdTime.SetValue(0, 0, 0);
37 __modifiedTime.SetValue(0, 0, 0);
40 BookmarkData::BookmarkData(const BookmarkData& bookmark)
42 __bookmarkId = bookmark.__bookmarkId;
43 __bookmarkType = bookmark.__bookmarkType;
44 __bookmarkTitle = bookmark.__bookmarkTitle;
45 __bookmarkUrl = bookmark.__bookmarkUrl;
46 __parentId = bookmark.__parentId;
47 __iconPath=bookmark.__iconPath;
48 __faviconId=bookmark.__faviconId;
51 BookmarkData::~BookmarkData(void)
57 BookmarkData::operator =(const BookmarkData& rhs)
61 __bookmarkId = rhs.__bookmarkId;
62 __bookmarkType = rhs.__bookmarkType;
63 __bookmarkTitle = rhs.__bookmarkTitle;
64 __bookmarkUrl = rhs.__bookmarkUrl;
65 __parentId = rhs.__parentId;
66 __iconPath = rhs.__iconPath;
67 __faviconId = rhs.__faviconId;
73 BookmarkData::GetBookmarkId(void)
79 BookmarkData::GetBookmarkType(void)
81 if (__bookmarkUrl.GetLength() > 0)
82 __bookmarkType = BOOKMARK_TYPE_URL;
84 __bookmarkType = BOOKMARK_TYPE_FOLDER;
85 return __bookmarkType;
89 BookmarkData::GetBookmarkTitle(void)
91 return __bookmarkTitle;
95 BookmarkData::GetUrl(void)
101 BookmarkData::GetParentId(void)
107 BookmarkData::GetCreatedTime(void)
109 return __createdTime;
113 BookmarkData::GetModifiedTime(void)
115 return __modifiedTime;
119 BookmarkData::GetIconPath(void)
125 BookmarkData::GetFaviconId(void)
131 BookmarkData::SetBookmarkId(const String& strBookmarkId)
133 __bookmarkId = strBookmarkId;
137 BookmarkData::SetBookmarkTitle(String& strTitle)
140 __bookmarkTitle = strTitle;
143 void BookmarkData::SetBookmarkType(type bookmarkType)
145 __bookmarkType = bookmarkType;
149 BookmarkData::SetUrl(const String& strUrl)
151 __bookmarkUrl = strUrl;
155 BookmarkData::SetParentId(const String& strParentID)
157 __parentId = strParentID;
161 BookmarkData::SetCreatedTime(const DateTime& strCreatedTime)
163 __createdTime = strCreatedTime;
167 BookmarkData::SetModifiedTime(const DateTime& strModifiedTime)
169 __modifiedTime = strModifiedTime;
173 BookmarkData::SetIconPath(const String& strFilePath)
175 __iconPath = strFilePath;
179 BookmarkData::SetFaviconId(const String& strFaviconId)
181 __faviconId = strFaviconId;