#include <favorites.h>


Public Types | |
| typedef BookmarkList | super |
Public Member Functions | |
| bool | read (LPCTSTR path) |
| read XBEL bookmark file | |
| void | write (LPCTSTR path) const |
| write XBEL bookmark file | |
| bool | import_IE_favorites (HWND hwnd) |
| import Internet Explorer bookmarks from Favorites folder | |
Definition at line 96 of file favorites.h.
| typedef BookmarkList Favorites::super |
Definition at line 98 of file favorites.h.
| bool Favorites::import_IE_favorites | ( | HWND | hwnd ) |
import Internet Explorer bookmarks from Favorites folder
Definition at line 465 of file favorites.cpp.
References StartMenuDirectory::_dir, GetDesktopFolder(), and BookmarkList::import_IE_favorites().
Referenced by ExplorerGlobals::read_persistent().
{
WaitCursor wait;
StartMenuShellDirs dirs;
try {
dirs.push_back(ShellDirectory(GetDesktopFolder(), SpecialFolderPath(CSIDL_COMMON_FAVORITES, hwnd), hwnd));
dirs.push_back(ShellDirectory(GetDesktopFolder(), SpecialFolderPath(CSIDL_FAVORITES, hwnd), hwnd));
} catch(COMException&) {
}
for(StartMenuShellDirs::iterator it=dirs.begin(); it!=dirs.end(); ++it) {
StartMenuDirectory& smd = *it;
ShellDirectory& dir = smd._dir;
try {
super::import_IE_favorites(dir, hwnd);
} catch(COMException&) {
}
}
return true;
}


| bool Favorites::read | ( | LPCTSTR | path ) |
read XBEL bookmark file
Definition at line 425 of file favorites.cpp.
References XMLStorage::XMLDoc::_errors, ExplorerGlobals::_hwndDesktop, XMLStorage::const_XMLPos::back(), g_Globals, XMLStorage::const_XMLPos::go_down(), BookmarkList::read(), XMLStorage::XMLDoc::read_file(), XMLStorage::XMLErrorList::str(), and TEXT.
Referenced by ExplorerGlobals::read_persistent().
{
XMLDoc xbel;
if (!xbel.read_file(path)) {
if (!xbel._errors.empty())
MessageBox(g_Globals._hwndDesktop, xbel._errors.str(),
TEXT("ROS Explorer - reading bookmark file"), MB_OK);
}
const_XMLPos pos(&xbel);
if (!pos.go_down("xbel"))
return false;
super::read(pos);
pos.back();
return true;
}


| void Favorites::write | ( | LPCTSTR | path ) | const |
write XBEL bookmark file
Definition at line 448 of file favorites.cpp.
References XMLStorage::XMLFormat::_doctype, XMLStorage::XMLDoc::_format, XMLStorage::DocType::_name, XMLStorage::DocType::_public, XMLStorage::DocType::_system, XMLStorage::XMLPos::back(), XMLStorage::XMLPos::create(), BookmarkList::write(), and XMLStorage::XMLDoc::write_file().
Referenced by ExplorerGlobals::read_persistent(), and ExplorerGlobals::write_persistent().
{
XMLDoc xbel;
XMLPos pos(&xbel);
pos.create("xbel");
super::write(pos);
pos.back();
xbel._format._doctype._name = "xbel";
xbel._format._doctype._public = "+//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML";
xbel._format._doctype._system = "http://www.python.org/topics/xml/dtds/xbel-1.0.dtd";
xbel.write_file(path);
}


|
ROS Explorer Source Code Documentation
generated on 02.01.2013 by
|