* Cleaned up fonts for MacOSX.

* made changes to win32.cpp cross-platform.
 * updated rsfiles.h
 * updated version to v0.4.10b




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@692 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-08-16 17:10:01 +00:00
parent cf7d072a5b
commit 45f2108fd0
15 changed files with 212 additions and 260 deletions

View File

@ -478,17 +478,6 @@
</disabled> </disabled>
</palette> </palette>
</property> </property>
<property name="font" >
<font>
<family>Arial</family>
<pointsize>10</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::CustomContextMenu</enum> <enum>Qt::CustomContextMenu</enum>
</property> </property>

View File

@ -478,17 +478,6 @@
</disabled> </disabled>
</palette> </palette>
</property> </property>
<property name="font" >
<font>
<family>Arial</family>
<pointsize>10</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::CustomContextMenu</enum> <enum>Qt::CustomContextMenu</enum>
</property> </property>

View File

@ -287,6 +287,9 @@ void MessagesDialog::getallrecommended()
for(fit = fnames.begin(), hit = hashes.begin(), sit = sizes.begin(); for(fit = fnames.begin(), hit = hashes.begin(), sit = sizes.begin();
fit != fnames.end(); fit++, hit++, sit++) fit != fnames.end(); fit++, hit++, sit++)
{ {
std::cerr << "MessagesDialog::getallrecommended() Calling File Request";
std::cerr << std::endl;
rsFiles -> FileRequest(*fit, *hit, *sit, "", 0); rsFiles -> FileRequest(*fit, *hit, *sit, "", 0);
} }
} }

View File

@ -103,17 +103,6 @@ p, li { white-space: pre-wrap; }
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="font" >
<font>
<family>Arial</family>
<pointsize>8</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::CustomContextMenu</enum> <enum>Qt::CustomContextMenu</enum>
</property> </property>

View File

@ -478,17 +478,6 @@
</disabled> </disabled>
</palette> </palette>
</property> </property>
<property name="font" >
<font>
<family>Arial</family>
<pointsize>8</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
@ -500,12 +489,6 @@
</property> </property>
<item row="0" column="0" > <item row="0" column="0" >
<layout class="QGridLayout" > <layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" > <item row="0" column="0" >
<widget class="QLabel" name="label" > <widget class="QLabel" name="label" >
<property name="text" > <property name="text" >
@ -533,7 +516,7 @@ p, li { white-space: pre-wrap; }
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" >
<size> <size>
<width>201</width> <width>201</width>
<height>20</height> <height>20</height>
@ -582,26 +565,20 @@ p, li { white-space: pre-wrap; }
</item> </item>
<item row="0" column="1" > <item row="0" column="1" >
<layout class="QGridLayout" > <layout class="QGridLayout" >
<property name="margin" > <property name="horizontalSpacing" >
<number>0</number> <number>0</number>
</property> </property>
<property name="spacing" > <property name="verticalSpacing" >
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0" > <item row="0" column="0" >
<layout class="QGridLayout" > <layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="1" > <item row="0" column="1" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" >
<size> <size>
<width>181</width> <width>181</width>
<height>20</height> <height>20</height>
@ -611,12 +588,6 @@ p, li { white-space: pre-wrap; }
</item> </item>
<item row="0" column="0" > <item row="0" column="0" >
<layout class="QGridLayout" > <layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" > <item row="0" column="0" >
<widget class="QLabel" name="label_3" > <widget class="QLabel" name="label_3" >
<property name="text" > <property name="text" >
@ -670,18 +641,12 @@ p, li { white-space: pre-wrap; }
<layout class="QGridLayout" > <layout class="QGridLayout" >
<item row="0" column="0" > <item row="0" column="0" >
<layout class="QGridLayout" > <layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" > <item row="0" column="0" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" >
<size> <size>
<width>321</width> <width>321</width>
<height>20</height> <height>20</height>
@ -710,8 +675,7 @@ p, li { white-space: pre-wrap; }
<string/> <string/>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="images.qrc" > <iconset resource="images.qrc" >:/images/edit-italic.png</iconset>
<normaloff>:/images/edit-italic.png</normaloff>:/images/edit-italic.png</iconset>
</property> </property>
<property name="checkable" > <property name="checkable" >
<bool>true</bool> <bool>true</bool>
@ -739,8 +703,7 @@ p, li { white-space: pre-wrap; }
<string/> <string/>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="images.qrc" > <iconset resource="images.qrc" >:/images/edit-underline.png</iconset>
<normaloff>:/images/edit-underline.png</normaloff>:/images/edit-underline.png</iconset>
</property> </property>
<property name="checkable" > <property name="checkable" >
<bool>true</bool> <bool>true</bool>
@ -768,8 +731,7 @@ p, li { white-space: pre-wrap; }
<string/> <string/>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="images.qrc" > <iconset resource="images.qrc" >:/images/edit-bold.png</iconset>
<normaloff>:/images/edit-bold.png</normaloff>:/images/edit-bold.png</iconset>
</property> </property>
<property name="checkable" > <property name="checkable" >
<bool>true</bool> <bool>true</bool>
@ -838,8 +800,7 @@ p, li { white-space: pre-wrap; }
<string/> <string/>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="images.qrc" > <iconset resource="images.qrc" >:/images/emoticons/kopete/kopete020.png</iconset>
<normaloff>:/images/emoticons/kopete/kopete020.png</normaloff>:/images/emoticons/kopete/kopete020.png</iconset>
</property> </property>
<property name="iconSize" > <property name="iconSize" >
<size> <size>
@ -907,7 +868,7 @@ p, li { white-space: pre-wrap; }
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" >
<size> <size>
<width>321</width> <width>321</width>
<height>20</height> <height>20</height>

View File

@ -478,17 +478,6 @@
</disabled> </disabled>
</palette> </palette>
</property> </property>
<property name="font" >
<font>
<family>Arial</family>
<pointsize>10</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
@ -509,20 +498,26 @@
</property> </property>
<widget class="QWidget" name="centralwidget" > <widget class="QWidget" name="centralwidget" >
<layout class="QGridLayout" > <layout class="QGridLayout" >
<property name="margin" > <property name="leftMargin" >
<number>6</number> <number>6</number>
</property> </property>
<property name="spacing" > <property name="topMargin" >
<number>6</number>
</property>
<property name="rightMargin" >
<number>6</number>
</property>
<property name="bottomMargin" >
<number>6</number>
</property>
<property name="horizontalSpacing" >
<number>3</number>
</property>
<property name="verticalSpacing" >
<number>3</number> <number>3</number>
</property> </property>
<item row="2" column="0" > <item row="2" column="0" >
<layout class="QGridLayout" > <layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="1" > <item row="0" column="1" >
<widget class="QPushButton" name="cancelprefButton" > <widget class="QPushButton" name="cancelprefButton" >
<property name="minimumSize" > <property name="minimumSize" >
@ -1072,14 +1067,17 @@
</size> </size>
</property> </property>
<attribute name="toolBarArea" > <attribute name="toolBarArea" >
<number>4</number> <enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak" >
<bool>false</bool>
</attribute> </attribute>
</widget> </widget>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>ConfigPageStack</class> <class>ConfigPageStack</class>
<extends>QStackedPageWidget</extends> <extends>QWidget</extends>
<header>gui/Preferences/configpagestack.h</header> <header>gui/Preferences/configpagestack.h</header>
</customwidget> </customwidget>
</customwidgets> </customwidgets>

View File

@ -484,17 +484,6 @@
</disabled> </disabled>
</palette> </palette>
</property> </property>
<property name="font" >
<font>
<family>Arial</family>
<pointsize>8</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
@ -523,7 +512,7 @@
<property name="bottomMargin" > <property name="bottomMargin" >
<number>2</number> <number>2</number>
</property> </property>
<item row="1" column="0" > <item row="0" column="0" >
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<widget class="QComboBox" name="netModeComboBox" > <widget class="QComboBox" name="netModeComboBox" >
@ -592,104 +581,141 @@
<property name="title" > <property name="title" >
<string>Server Status And Network Settings</string> <string>Server Status And Network Settings</string>
</property> </property>
<layout class="QGridLayout" > <layout class="QVBoxLayout" >
<property name="leftMargin" > <item>
<number>4</number> <layout class="QGridLayout" >
</property> <item rowspan="6" row="0" column="0" >
<property name="topMargin" > <widget class="QTextEdit" name="netStatusBox" />
<number>4</number> </item>
</property> <item row="0" column="1" >
<property name="rightMargin" > <widget class="QCheckBox" name="checkBox" >
<number>4</number> <property name="text" >
</property> <string>Network Okay</string>
<property name="bottomMargin" > </property>
<number>4</number> <property name="checkable" >
</property> <bool>false</bool>
<item row="0" column="0" > </property>
<layout class="QVBoxLayout" > </widget>
</item>
<item row="1" column="1" >
<widget class="QCheckBox" name="checkBox_6" >
<property name="text" >
<string>UPnP Active</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QCheckBox" name="checkBox_5" >
<property name="text" >
<string>DHT Okay</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QCheckBox" name="checkBox_2" >
<property name="text" >
<string>Found Ext IP Addr</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QCheckBox" name="checkBox_3" >
<property name="text" >
<string>UDP Connections</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QCheckBox" name="checkBox_4" >
<property name="text" >
<string>TCP server</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" >
<item> <item>
<layout class="QHBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<widget class="QLabel" name="label_6" > <widget class="QLabel" name="label" >
<property name="text" > <property name="text" >
<string>Network Status</string> <string>Local Address</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QTextEdit" name="netStatusBox" /> <widget class="QLabel" name="label_2" >
<property name="text" >
<string>External Address</string>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" > <layout class="QGridLayout" >
<item> <item row="0" column="0" >
<layout class="QVBoxLayout" > <widget class="QLineEdit" name="localAddress" />
<item>
<widget class="QLabel" name="label" >
<property name="text" >
<string>Local Address</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>External Address</string>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item row="0" column="1" >
<layout class="QGridLayout" > <widget class="QLabel" name="label_5" >
<item row="0" column="0" > <property name="text" >
<widget class="QLineEdit" name="localAddress" /> <string>Port:</string>
</item> </property>
<item row="0" column="1" > </widget>
<widget class="QLabel" name="label_5" > </item>
<property name="text" > <item row="0" column="2" >
<string>Port:</string> <widget class="QSpinBox" name="localPort" >
</property> <property name="minimum" >
</widget> <number>0</number>
</item> </property>
<item row="0" column="2" > <property name="maximum" >
<widget class="QSpinBox" name="localPort" > <number>65535</number>
<property name="minimum" > </property>
<number>0</number> <property name="value" >
</property> <number>7812</number>
<property name="maximum" > </property>
<number>65535</number> </widget>
</property> </item>
<property name="value" > <item row="1" column="0" >
<number>7812</number> <widget class="QLineEdit" name="extAddress" />
</property> </item>
</widget> <item row="1" column="1" >
</item> <widget class="QLabel" name="label_4" >
<item row="1" column="0" > <property name="text" >
<widget class="QLineEdit" name="extAddress" /> <string>Port:</string>
</item> </property>
<item row="1" column="1" > </widget>
<widget class="QLabel" name="label_4" > </item>
<property name="text" > <item row="1" column="2" >
<string>Port:</string> <widget class="QSpinBox" name="extPort" >
</property> <property name="minimum" >
</widget> <number>0</number>
</item> </property>
<item row="1" column="2" > <property name="maximum" >
<widget class="QSpinBox" name="extPort" > <number>65535</number>
<property name="minimum" > </property>
<number>0</number> <property name="value" >
</property> <number>7812</number>
<property name="maximum" > </property>
<number>65535</number> </widget>
</property>
<property name="value" >
<number>7812</number>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</item> </item>

View File

@ -227,6 +227,8 @@ void SearchDialog::download()
// call the download // call the download
if (item->text(SR_ID_COL) != "Local") if (item->text(SR_ID_COL) != "Local")
{ {
std::cerr << "SearchDialog::download() Calling File Request";
std::cerr << std::endl;
rsFiles -> FileRequest((item->text(SR_NAME_COL)).toStdString(), rsFiles -> FileRequest((item->text(SR_NAME_COL)).toStdString(),
(item->text(SR_HASH_COL)).toStdString(), (item->text(SR_HASH_COL)).toStdString(),
(item->text(SR_SIZE_COL)).toInt(), (item->text(SR_SIZE_COL)).toInt(),

View File

@ -484,17 +484,6 @@
</disabled> </disabled>
</palette> </palette>
</property> </property>
<property name="font" >
<font>
<family>Arial</family>
<pointsize>8</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>

View File

@ -30,6 +30,8 @@
* #define DEBUG_ITEM 1 * #define DEBUG_ITEM 1
****/ ****/
#define DEBUG_ITEM 1
/******************************************************************* /*******************************************************************
* SubFileItem fully controls the file transfer from the gui side * SubFileItem fully controls the file transfer from the gui side
* *
@ -536,6 +538,8 @@ void SubFileItem::download()
} }
// TEMP // TEMP
std::cerr << "SubFileItem::download() Calling File Request";
std::cerr << std::endl;
rsFiles->FileRequest(mFileName, mFileHash, mFileSize, "", 0); rsFiles->FileRequest(mFileName, mFileHash, mFileSize, "", 0);
} }

View File

@ -692,6 +692,8 @@ void RemoteDirModel::downloadSelected(QModelIndexList list)
/* only request if it is a file */ /* only request if it is a file */
if (details.type == DIR_TYPE_FILE) if (details.type == DIR_TYPE_FILE)
{ {
std::cerr << "RemoteDirModel::downloadSelected() Calling File Request";
std::cerr << std::endl;
rsFiles -> FileRequest(details.name, details.hash, rsFiles -> FileRequest(details.name, details.hash,
details.count, "", 0); details.count, "", 0);
} }

View File

@ -51,19 +51,22 @@ const uint32_t RS_FILE_CTRL_STREAM_VIDEO = 0x0006;
/************************************ /************************************
* Used To indicate where to search. * Used To indicate where to search.
*
* The Order of these is very important,
* it specifies the search order too.
*
*/ */
const uint32_t RS_FILE_HINTS_MASK = 0x00ff; const uint32_t RS_FILE_HINTS_MASK = 0x00ffffff;
const uint32_t RS_FILE_HINTS_CACHE = 0x0001; const uint32_t RS_FILE_HINTS_CACHE = 0x00000001;
const uint32_t RS_FILE_HINTS_EXTRA = 0x0002; const uint32_t RS_FILE_HINTS_EXTRA = 0x00000002;
const uint32_t RS_FILE_HINTS_LOCAL = 0x0004; const uint32_t RS_FILE_HINTS_LOCAL = 0x00000004;
const uint32_t RS_FILE_HINTS_REMOTE = 0x0008; const uint32_t RS_FILE_HINTS_REMOTE = 0x00000008;
const uint32_t RS_FILE_HINTS_DOWNLOAD = 0x0010; const uint32_t RS_FILE_HINTS_DOWNLOAD = 0x00000010;
const uint32_t RS_FILE_HINTS_UPLOAD = 0x0020; const uint32_t RS_FILE_HINTS_UPLOAD = 0x00000020;
const uint32_t RS_FILE_HINTS_SPEC_ONLY = 0x1000;
const uint32_t RS_FILE_HINTS_SPEC_ONLY = 0x01000000;
const uint32_t RS_FILE_EXTRA_DELETE = 0x0010; const uint32_t RS_FILE_EXTRA_DELETE = 0x0010;
@ -79,43 +82,27 @@ virtual ~RsFiles() { return; }
/****************************************/ /****************************************/
/* download */ /* download */
/* Required Interfaces ......
*
* 1) Access to downloading / uploading files.
*/
/* get Details of File Transfers */
virtual bool FileDownloads(std::list<std::string> &hashs) = 0;
virtual bool FileUploads(std::list<std::string> &hashs) = 0;
virtual bool FileDetails(std::string hash, uint32_t hintflags, FileInfo &info) = 0;
/*
* 2) Control of Downloads.
*
*/
/***
* Control of Downloads.
***/
virtual bool FileRequest(std::string fname, std::string hash, virtual bool FileRequest(std::string fname, std::string hash,
uint32_t size, std::string dest, uint32_t flags) = 0; uint32_t size, std::string dest, uint32_t flags) = 0;
virtual bool FileCancel(std::string hash) = 0; virtual bool FileCancel(std::string hash) = 0;
virtual bool FileControl(std::string hash, uint32_t flags) = 0; virtual bool FileControl(std::string hash, uint32_t flags) = 0;
virtual bool FileClearCompleted() = 0; virtual bool FileClearCompleted() = 0;
/***
* Download / Upload Details.
***/
virtual bool FileDownloads(std::list<std::string> &hashs) = 0;
virtual bool FileUploads(std::list<std::string> &hashs) = 0;
virtual bool FileDetails(std::string hash, uint32_t hintflags, FileInfo &info) = 0;
/*
* 3) Addition of Extra Files... From File System
* These are Hashed and stored in the 'Hidden Files' section
* which can only be accessed if you know the hash.
*
* FileHash is called to start the hashing process,
* and add the file to the HiddenStore.
*
* FileHashStatus is called to lookup files
* and see if the hashing is completed.
*/
/* Access ftExtraList - Details */ /***
* Extra List Access
***/
virtual bool ExtraFileAdd(std::string fname, std::string hash, uint32_t size, virtual bool ExtraFileAdd(std::string fname, std::string hash, uint32_t size,
uint32_t period, uint32_t flags) = 0; uint32_t period, uint32_t flags) = 0;
virtual bool ExtraFileRemove(std::string hash, uint32_t flags) = 0; virtual bool ExtraFileRemove(std::string hash, uint32_t flags) = 0;
@ -124,25 +111,25 @@ virtual bool ExtraFileHash(std::string localpath,
virtual bool ExtraFileStatus(std::string localpath, FileInfo &info) = 0; virtual bool ExtraFileStatus(std::string localpath, FileInfo &info) = 0;
/* /***
* 4) Search and Listing Interface * Directory Listing / Search Interface
*/ */
/* Directory Listing / Search Interface */
virtual int RequestDirDetails(std::string uid, std::string path, DirDetails &details) = 0; virtual int RequestDirDetails(std::string uid, std::string path, DirDetails &details) = 0;
virtual int RequestDirDetails(void *ref, DirDetails &details, uint32_t flags) = 0; virtual int RequestDirDetails(void *ref, DirDetails &details, uint32_t flags) = 0;
virtual int SearchKeywords(std::list<std::string> keywords, std::list<FileDetail> &results) = 0; virtual int SearchKeywords(std::list<std::string> keywords, std::list<FileDetail> &results) = 0;
virtual int SearchBoolExp(Expression * exp, std::list<FileDetail> &results) = 0; virtual int SearchBoolExp(Expression * exp, std::list<FileDetail> &results) = 0;
/* /***
* 5) Directory Control / Shared Files Utility Functions. * Utility Functions.
*/ ***/
virtual bool ConvertSharedFilePath(std::string path, std::string &fullpath) = 0; virtual bool ConvertSharedFilePath(std::string path, std::string &fullpath) = 0;
virtual void ForceDirectoryCheck() = 0; virtual void ForceDirectoryCheck() = 0;
virtual bool InDirectoryCheck() = 0; virtual bool InDirectoryCheck() = 0;
/***
* Directory Control
***/
virtual void setDownloadDirectory(std::string path) = 0; virtual void setDownloadDirectory(std::string path) = 0;
virtual void setPartialsDirectory(std::string path) = 0; virtual void setPartialsDirectory(std::string path) = 0;
virtual std::string getDownloadDirectory() = 0; virtual std::string getDownloadDirectory() = 0;

View File

@ -23,7 +23,7 @@
//#define USE_SVN_VERSIONS 1 //#define USE_SVN_VERSIONS 1
#define VERSION "0.4.10a" #define VERSION "0.4.10b"
#if USE_SVN_VERSIONS #if USE_SVN_VERSIONS
#include "svn_revision.h" #include "svn_revision.h"

View File

@ -20,6 +20,13 @@
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
****************************************************************/ ****************************************************************/
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
#if 0 #if 0
#include <windows.h> #include <windows.h>
#include <shlobj.h> #include <shlobj.h>
@ -63,6 +70,7 @@ win32_get_folder_location(int folder, QString defaultPath)
QString QString
win32_registry_get_key_value(QString keyLocation, QString keyName) win32_registry_get_key_value(QString keyLocation, QString keyName)
{ {
#ifdef WIN32
HKEY key; HKEY key;
char data[255] = {0}; char data[255] = {0};
DWORD size = sizeof(data); DWORD size = sizeof(data);
@ -81,12 +89,16 @@ win32_registry_get_key_value(QString keyLocation, QString keyName)
RegCloseKey(key); RegCloseKey(key);
return QString(data); return QString(data);
#else
return QString();
#endif
} }
/** Creates and/or sets the key to the specified value */ /** Creates and/or sets the key to the specified value */
void void
win32_registry_set_key_value(QString keyLocation, QString keyName, QString keyValue) win32_registry_set_key_value(QString keyLocation, QString keyName, QString keyValue)
{ {
#ifdef WIN32
HKEY key; HKEY key;
/* Open the key for writing (opens new key if it doesn't exist */ /* Open the key for writing (opens new key if it doesn't exist */
@ -108,12 +120,14 @@ win32_registry_set_key_value(QString keyLocation, QString keyName, QString keyVa
/* Close the key */ /* Close the key */
RegCloseKey(key); RegCloseKey(key);
#endif
} }
/** Removes the key from the registry if it exists */ /** Removes the key from the registry if it exists */
void void
win32_registry_remove_key(QString keyLocation, QString keyName) win32_registry_remove_key(QString keyLocation, QString keyName)
{ {
#ifdef WIN32
HKEY key; HKEY key;
/* Open the key for writing (opens new key if it doesn't exist */ /* Open the key for writing (opens new key if it doesn't exist */
@ -127,6 +141,7 @@ win32_registry_remove_key(QString keyLocation, QString keyName)
/* Close anything that was opened */ /* Close anything that was opened */
RegCloseKey(key); RegCloseKey(key);
#endif
} }
/** Gets the location of the user's %PROGRAMFILES% folder. */ /** Gets the location of the user's %PROGRAMFILES% folder. */

View File

@ -24,8 +24,6 @@
#ifndef _WIN32_H #ifndef _WIN32_H
#define _WIN32_H #define _WIN32_H
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <QHash> #include <QHash>
#include <QString> #include <QString>