2 * Copyright (c) 2014 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.
19 * Created on: Apr, 2014
23 #ifndef BOOKMARKITEM_H
24 #define BOOKMARKITEM_H
26 #include "BrowserLogger.h"
28 #include "BrowserImage.h"
30 namespace tizen_browser{
38 const std::string& url,
39 const std::string& title,
40 const std::string& note,
44 virtual ~BookmarkItem();
46 void setAddress(const std::string & url) { m_url = url; };
47 std::string getAddress() const { return m_url; };
49 void setTittle(const std::string & tittle) { m_title = tittle; };
50 std::string getTittle() const { return m_title; };
52 void setNote(const std::string& note){m_note = note;};
53 std::string getNote() const { return m_note;};
55 void setId(int id) { m_saved_id = id; };
56 int getId() const { return m_saved_id; };
58 void setThumbnail(std::shared_ptr<tizen_browser::tools::BrowserImage> thumbnail);
59 std::shared_ptr<tizen_browser::tools::BrowserImage> getThumbnail() const ;
61 void setFavicon(std::shared_ptr<tizen_browser::tools::BrowserImage> favicon);
62 std::shared_ptr<tizen_browser::tools::BrowserImage> getFavicon() const;
64 void setDir(unsigned int dir){m_directory = dir;};
65 unsigned int getDir() const {return m_directory;};
67 void setTags(const std::vector<unsigned int>& tags) { m_tags = tags; };
68 std::vector<unsigned int> getTags() const { return m_tags; };
70 bool is_folder(void) const { return m_is_folder; }
71 bool is_editable(void) const { return m_is_editable; }
73 void set_folder_flag(bool flag) { m_is_folder = flag; }
74 void set_editable_flag(bool flag) { m_is_editable = flag; }
77 unsigned int m_saved_id;
81 std::shared_ptr<tizen_browser::tools::BrowserImage> m_thumbnail;
82 std::shared_ptr<tizen_browser::tools::BrowserImage> m_favicon;
83 unsigned int m_directory;
84 std::vector<unsigned int> m_tags;
89 typedef std::shared_ptr<BookmarkItem> SharedBookmarkItem;
90 typedef std::vector<SharedBookmarkItem> SharedBookmarkItemList;
95 #endif // BOOKMARKITEM_H