[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r5751 - in gnunet-qt: . src/core src/plugins/fs src/plugins
From: |
gnunet |
Subject: |
[GNUnet-SVN] r5751 - in gnunet-qt: . src/core src/plugins/fs src/plugins/general src/plugins/stats |
Date: |
Sat, 24 Nov 2007 15:50:54 -0700 (MST) |
Author: durner
Date: 2007-11-24 15:50:52 -0700 (Sat, 24 Nov 2007)
New Revision: 5751
Modified:
gnunet-qt/configure.ac
gnunet-qt/src/core/main.cc
gnunet-qt/src/plugins/fs/downloadController.cc
gnunet-qt/src/plugins/fs/downloadController.h
gnunet-qt/src/plugins/fs/downloadItemDelegate.cc
gnunet-qt/src/plugins/fs/ecrsMetaData.cc
gnunet-qt/src/plugins/fs/ecrsuri.cc
gnunet-qt/src/plugins/fs/fs.cc
gnunet-qt/src/plugins/fs/searchController.cc
gnunet-qt/src/plugins/fs/uploadController.cc
gnunet-qt/src/plugins/general/checkDaemonThread.cc
gnunet-qt/src/plugins/general/startStopThread.cc
gnunet-qt/src/plugins/stats/statsThread.cc
Log:
use new naming convention
Modified: gnunet-qt/configure.ac
===================================================================
--- gnunet-qt/configure.ac 2007-11-24 13:40:46 UTC (rev 5750)
+++ gnunet-qt/configure.ac 2007-11-24 22:50:52 UTC (rev 5751)
@@ -60,7 +60,7 @@
;;
yes)
AC_CHECK_HEADERS(GNUnet/gnunet_util.h,
- AC_CHECK_LIB([gnunetutil], [os_init],
+ AC_CHECK_LIB([gnunetutil], [GNUNET_os_init],
gnunet=1))
;;
*)
@@ -69,7 +69,7 @@
CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"
INCLUDEPATH="$with_gnunet/include $INCLUDEPATH"
AC_CHECK_HEADERS(GNUnet/gnunet_util.h,
- AC_CHECK_LIB([gnunetutil], [os_init],
+ AC_CHECK_LIB([gnunetutil], [GNUNET_os_init],
EXT_LIB_PATH="-L$with_gnunet/lib $EXT_LIB_PATH"
gnunet=1))
;;
@@ -77,7 +77,7 @@
],
[AC_MSG_RESULT([--with-gnunet not specified])
AC_CHECK_HEADERS(gnunet_util.h,
- AC_CHECK_LIB([GNUnet/gnunet_util.h], [os_init],
+ AC_CHECK_LIB([GNUnet/gnunet_util.h], [GNUNET_os_init],
gnunet=1))])
if test "$gnunet" != 1
then
Modified: gnunet-qt/src/core/main.cc
===================================================================
--- gnunet-qt/src/core/main.cc 2007-11-24 13:40:46 UTC (rev 5750)
+++ gnunet-qt/src/core/main.cc 2007-11-24 22:50:52 UTC (rev 5751)
@@ -48,7 +48,7 @@
static struct GC_Configuration *cfg;
#if defined(Q_OS_WIN)
-static int debug_mode = NO;
+static int debug_mode = GNUNET_NO;
#endif
@@ -63,19 +63,19 @@
/**
* All gnunet-qt command line options
*/
-static struct CommandLineOption gnunetqtOptions[] = {
- COMMAND_LINE_OPTION_CFG_FILE(&cfgFilename), /* -c */
+static struct GNUNET_CommandLineOption gnunetqtOptions[] = {
+ GNUNET_COMMAND_LINE_OPTION_CFG_FILE(&cfgFilename), /* -c */
#if defined(Q_OS_WIN)
{ 'd', "debug", NULL,
gettext_noop("run in debug mode"),
- 0, &gnunet_getopt_configure_set_one, &debug_mode },
+ 0, &GNUNET_getopt_configure_set_one, &debug_mode },
#endif
- COMMAND_LINE_OPTION_HELP(gettext_noop("GNUnet Qt user interface.")), /* -h */
- COMMAND_LINE_OPTION_HOSTNAME, /* -H */
- COMMAND_LINE_OPTION_LOGGING, /* -L */
- COMMAND_LINE_OPTION_VERSION(VERSION), /* -v */
- COMMAND_LINE_OPTION_VERBOSE,
- COMMAND_LINE_OPTION_END
+ GNUNET_COMMAND_LINE_OPTION_HELP(gettext_noop("GNUnet Qt user interface.")),
/* -h */
+ GNUNET_COMMAND_LINE_OPTION_HOSTNAME, /* -H */
+ GNUNET_COMMAND_LINE_OPTION_LOGGING, /* -L */
+ GNUNET_COMMAND_LINE_OPTION_VERSION(VERSION), /* -v */
+ GNUNET_COMMAND_LINE_OPTION_VERBOSE,
+ GNUNET_COMMAND_LINE_OPTION_END
};
#if defined(Q_OS_WIN)
@@ -214,7 +214,7 @@
count--;
}
- FREE(cfgPlugins);
+ GNUNET_free(cfgPlugins);
}
void GApplication::showWindow()
@@ -235,7 +235,7 @@
GLoggerClosure logCls;
if (GNUNET_init(argc, argv, "gnunet-qt [OPTIONS]", &cfgFilename,
- gnunetqtOptions, &stdECtx, &cfg) == SYSERR)
+ gnunetqtOptions, &stdECtx, &cfg) == GNUNET_SYSERR)
return 1;
app = new GApplication(argc, (char **) argv, cfg);
@@ -252,7 +252,7 @@
strLocale = locale();
#endif
transl.load(QString("gnunet-qt_") + strLocale,
- QString(os_get_installation_path(IPK_DATADIR)) + ".." + QDir::separator() +
+ QString(GNUNET_get_installation_path(GNUNET_IPK_DATADIR)) + ".." +
QDir::separator() +
"gnunet-qt" + QDir::separator() + "locale" + QDir::separator());
app->installTranslator(&transl);
Modified: gnunet-qt/src/plugins/fs/downloadController.cc
===================================================================
--- gnunet-qt/src/plugins/fs/downloadController.cc 2007-11-24 13:40:46 UTC
(rev 5750)
+++ gnunet-qt/src/plugins/fs/downloadController.cc 2007-11-24 22:50:52 UTC
(rev 5751)
@@ -63,7 +63,7 @@
}
void GFSDownloadController::setProgress(QPersistentModelIndex *idx,
- unsigned long long completed, unsigned long long total, cron_t eta)
+ unsigned long long completed, unsigned long long total, GNUNET_CronTime eta)
{
QModelIndex item, parent;
double progress;
@@ -84,7 +84,7 @@
{
int children = 0;
double overallProgress = 0;
- cron_t overallETA = 0;
+ GNUNET_CronTime overallETA = 0;
QModelIndex progressIdx;
item = parent.child(children, COL_PROGRESS);
@@ -209,7 +209,7 @@
Qt::DisplayRole);
idx = new QPersistentModelIndex(item->index());
- setProgress(idx, completed, total, (cron_t) -1);
+ setProgress(idx, completed, total, (GNUNET_CronTime) -1);
state(idx, (total != completed) ? FSUI_download_started :
FSUI_download_completed);
@@ -217,7 +217,7 @@
}
void GFSDownloadController::progress(QPersistentModelIndex *idx, unsigned long
long completed,
- unsigned long long total, cron_t eta)
+ unsigned long long total, GNUNET_CronTime eta)
{
setProgress(idx, completed, total, eta);
state(idx, FSUI_download_progress);
Modified: gnunet-qt/src/plugins/fs/downloadController.h
===================================================================
--- gnunet-qt/src/plugins/fs/downloadController.h 2007-11-24 13:40:46 UTC
(rev 5750)
+++ gnunet-qt/src/plugins/fs/downloadController.h 2007-11-24 22:50:52 UTC
(rev 5751)
@@ -65,7 +65,7 @@
unsigned long long total, unsigned long long completed);
void progress(QPersistentModelIndex *idx, unsigned long long completed,
- unsigned long long total, cron_t eta);
+ unsigned long long total, GNUNET_CronTime eta);
void completed(QPersistentModelIndex *idx, GFSEcrsUri uri, QString file);
@@ -85,7 +85,7 @@
GFSDownloadList downloadList;
void setProgress(QPersistentModelIndex *idx, unsigned long long completed,
- unsigned long long total, cron_t eta);
+ unsigned long long total, GNUNET_CronTime eta);
};
#endif /*DOWNLOADCONTROLLER_H_*/
Modified: gnunet-qt/src/plugins/fs/downloadItemDelegate.cc
===================================================================
--- gnunet-qt/src/plugins/fs/downloadItemDelegate.cc 2007-11-24 13:40:46 UTC
(rev 5750)
+++ gnunet-qt/src/plugins/fs/downloadItemDelegate.cc 2007-11-24 22:50:52 UTC
(rev 5751)
@@ -61,16 +61,16 @@
}
else if (col == GFSDownloadController::COL_ETA)
{
- cron_t time = index.model()->data(index).toLongLong();
+ GNUNET_CronTime time = index.model()->data(index).toLongLong();
- if (time != (cron_t) -1)
+ if (time != (GNUNET_CronTime) -1)
{
- char *p = string_get_fancy_time_interval(time);
+ char *p = GNUNET_get_time_interval_as_fancy_string(time);
painter->drawText(option.rect, Qt::AlignLeft | Qt::AlignVCenter |
Qt::TextWordWrap, QString(p));
- FREE(p);
+ GNUNET_free(p);
}
}
Modified: gnunet-qt/src/plugins/fs/ecrsMetaData.cc
===================================================================
--- gnunet-qt/src/plugins/fs/ecrsMetaData.cc 2007-11-24 13:40:46 UTC (rev
5750)
+++ gnunet-qt/src/plugins/fs/ecrsMetaData.cc 2007-11-24 22:50:52 UTC (rev
5751)
@@ -85,14 +85,14 @@
int size;
size = ECRS_sizeofMetaData(metaData, ECRS_SERIALIZE_FULL);
- if (size != SYSERR)
+ if (size != GNUNET_SYSERR)
{
QByteArray ret;
char *data;
data = new char[size];
GNUNETQT_ASSERT(ECRS_serializeMetaData(NULL, metaData, data, size,
- ECRS_SERIALIZE_FULL) != SYSERR);
+ ECRS_SERIALIZE_FULL) != GNUNET_SYSERR);
ret = QByteArray(data, size);
delete [] data;
Modified: gnunet-qt/src/plugins/fs/ecrsuri.cc
===================================================================
--- gnunet-qt/src/plugins/fs/ecrsuri.cc 2007-11-24 13:40:46 UTC (rev 5750)
+++ gnunet-qt/src/plugins/fs/ecrsuri.cc 2007-11-24 22:50:52 UTC (rev 5751)
@@ -81,8 +81,8 @@
ret = (strcmp(s1, s2) < 0);
- FREE(s1);
- FREE(s2);
+ GNUNET_free(s1);
+ GNUNET_free(s2);
return ret;
}
@@ -109,7 +109,7 @@
else if (strncmp(dhead, ECRS_FILE_INFIX, strlen(ECRS_FILE_INFIX) == 0))
strRet = dhead + strlen(ECRS_FILE_INFIX);
- FREE(desc);
+ GNUNET_free(desc);
return strRet;
}
@@ -127,7 +127,7 @@
if (str)
{
ret = QString::fromLocal8Bit(str);
- FREE(str);
+ GNUNET_free(str);
}
return ret;
Modified: gnunet-qt/src/plugins/fs/fs.cc
===================================================================
--- gnunet-qt/src/plugins/fs/fs.cc 2007-11-24 13:40:46 UTC (rev 5750)
+++ gnunet-qt/src/plugins/fs/fs.cc 2007-11-24 22:50:52 UTC (rev 5751)
@@ -190,7 +190,7 @@
treeUploads->setEditTriggers(QAbstractItemView::NoEditTriggers);
/* FIXME: allow user to configure download parallelism */
- fsuiContext = FSUI_start(errorContext, config, "gnunet_qt", 128, YES,
+ fsuiContext = FSUI_start(errorContext, config, "gnunet_qt", 128, GNUNET_YES,
fsuiEventProcessor, this);
}
Modified: gnunet-qt/src/plugins/fs/searchController.cc
===================================================================
--- gnunet-qt/src/plugins/fs/searchController.cc 2007-11-24 13:40:46 UTC
(rev 5750)
+++ gnunet-qt/src/plugins/fs/searchController.cc 2007-11-24 22:50:52 UTC
(rev 5751)
@@ -60,7 +60,7 @@
model->setData(idx, QVariant(content), Qt::DisplayRole);
- return OK;
+ return GNUNET_OK;
}
GFSSearchInfo *GFSSearchController::started(struct FSUI_SearchList *list,
@@ -138,7 +138,7 @@
itemIdx = model->index(row, MODEL_IDX(EXTRACTOR_THUMBNAIL_DATA), parent);
model->setData(itemIdx, QVariant(data));
- FREE(thumb);
+ GNUNET_free(thumb);
}
// make directories expandable
@@ -270,7 +270,7 @@
/**
* @brief Callback that adds content of a directory to the search list
*/
-static int addFilesToDirectory(const ECRS_FileInfo *fi, const HashCode512 *key,
+static int addFilesToDirectory(const ECRS_FileInfo *fi, const GNUNET_HashCode
*key,
int isRoot, void *closure)
{
Q_UNUSED(key)
@@ -279,8 +279,8 @@
QStandardItemModel *model;
QModelIndex parentIdx, child;
- if (isRoot == YES)
- return OK;
+ if (isRoot == GNUNET_YES)
+ return GNUNET_OK;
GFSEcrsUri uri(fi->uri);
@@ -294,14 +294,14 @@
while (child.isValid())
{
if (GFSEcrsUri(model->data(child).toString()) == uri)
- return OK;
+ return GNUNET_OK;
child = child.sibling(child.row() + 1, SEARCH_URI_COLUMN);
}
GFSSearchController::addSearchResult(model, parentIdx, fi);
- return OK;
+ return GNUNET_OK;
}
void GFSSearchController::downloadCompleted(QPersistentModelIndex &idx,
GString file)
Modified: gnunet-qt/src/plugins/fs/uploadController.cc
===================================================================
--- gnunet-qt/src/plugins/fs/uploadController.cc 2007-11-24 13:40:46 UTC
(rev 5750)
+++ gnunet-qt/src/plugins/fs/uploadController.cc 2007-11-24 22:50:52 UTC
(rev 5751)
@@ -37,14 +37,14 @@
{
((QStringList *) list)->append(QString::fromUtf8(data));
- return OK;
+ return GNUNET_OK;
}
static int getMetaData(EXTRACTOR_KeywordType type, const char *data, void
*list)
{
((GFSMetaData *) list)->insert(type, data);
- return OK;
+ return GNUNET_OK;
}
GFSUploadController::GFSUploadController(GFSPlugin *fs)
@@ -106,7 +106,7 @@
NULL, &config) == 0 && config)
{
extractors = EXTRACTOR_loadConfigLibraries(extractors, config);
- FREE(config);
+ GNUNET_free(config);
}
}
@@ -182,9 +182,9 @@
// upload
handle = FSUI_startUpload(fs->context(), strPath.toLocal8Bit(),
- (DirectoryScanCallback) &disk_directory_scan, fs->errorContext(),
+ (DirectoryScanCallback) &GNUNET_disk_directory_scan, fs->errorContext(),
anon, prio, index, uploadDlg.extract(), uploadDlg.useKeywords(),
- get_time() + 2 * cronYEARS, meta, globalURI, keywordURI);
+ GNUNET_get_time() + 2 * GNUNET_CRON_YEARS, meta, globalURI, keywordURI);
// cleanup
idx = 0;
Modified: gnunet-qt/src/plugins/general/checkDaemonThread.cc
===================================================================
--- gnunet-qt/src/plugins/general/checkDaemonThread.cc 2007-11-24 13:40:46 UTC
(rev 5750)
+++ gnunet-qt/src/plugins/general/checkDaemonThread.cc 2007-11-24 22:50:52 UTC
(rev 5751)
@@ -63,19 +63,19 @@
{
bool check;
- check = (connection_test_running(errorContext, config) == YES);
+ check = (GNUNET_test_daemon_running(errorContext, config) == GNUNET_YES);
if (check)
{
checkAppsIn--;
if (checkAppsIn == 0)
{
GGNUnetAppDescs *descs = new GGNUnetAppDescs();
- ClientServerConnection *sock = client_connection_create(errorContext,
+ GNUNET_ClientServerConnection *sock =
GNUNET_client_connection_create(errorContext,
config);
if (sock)
{
- char *apps = getConfigurationOptionValue(sock, "GNUNETD",
"APPLICATIONS");
+ char *apps = GNUNET_get_daemon_configuration_value(sock, "GNUNETD",
"APPLICATIONS");
QString strApps = GString::fromLocal8Bit(apps);
QStringList appList = strApps.split(QRegExp("\\s+"));
@@ -86,17 +86,17 @@
appDesc.strApp = appList.takeFirst();
char *app = appDesc.strApp.toCString();
- char *desc = getConfigurationOptionValue(sock, "ABOUT", app);
+ char *desc = GNUNET_get_daemon_configuration_value(sock, "ABOUT",
app);
appDesc.strDesc = GString::fromLocal8Bit(desc);
descs->append(appDesc);
- FREENONNULL(desc);
+ GNUNET_free_non_null(desc);
count--;
}
- FREE(apps);
- connection_destroy(sock);
+ GNUNET_free(apps);
+ GNUNET_client_connection_destroy(sock);
checkAppsIn = 20; // 5 minutes / 15 seconds = 20 runs
}
Modified: gnunet-qt/src/plugins/general/startStopThread.cc
===================================================================
--- gnunet-qt/src/plugins/general/startStopThread.cc 2007-11-24 13:40:46 UTC
(rev 5750)
+++ gnunet-qt/src/plugins/general/startStopThread.cc 2007-11-24 22:50:52 UTC
(rev 5751)
@@ -53,13 +53,13 @@
bool ret;
if (doStart)
- ret = os_daemon_start(errorContext, config, NULL, YES) != SYSERR;
+ ret = GNUNET_daemon_start(errorContext, config, NULL, GNUNET_YES) !=
GNUNET_SYSERR;
else
{
- struct ClientServerConnection * sock;
+ struct GNUNET_ClientServerConnection * sock;
- sock = client_connection_create(errorContext, config);
- ret = connection_request_shutdown(sock) != SYSERR;
+ sock = GNUNET_client_connection_create(errorContext, config);
+ ret = GNUNET_client_connection_request_daemon_shutdown(sock) !=
GNUNET_SYSERR;
}
emit finished(ret, GE_strerror(errno));
Modified: gnunet-qt/src/plugins/stats/statsThread.cc
===================================================================
--- gnunet-qt/src/plugins/stats/statsThread.cc 2007-11-24 13:40:46 UTC (rev
5750)
+++ gnunet-qt/src/plugins/stats/statsThread.cc 2007-11-24 22:50:52 UTC (rev
5751)
@@ -43,7 +43,7 @@
{
((GStatsThread *) param)->processStat(name, value);
- return OK;
+ return GNUNET_OK;
}
void GStatsThread::processStat(const char *name, unsigned long long value)
@@ -55,9 +55,9 @@
{
int res;
QTime timer;
- struct ClientServerConnection *sock;
+ struct GNUNET_ClientServerConnection *sock;
- sock = client_connection_create(errorContext, config);
+ sock = GNUNET_client_connection_create(errorContext, config);
if (!sock)
{
GE_LOG(errorContext, (GE_KIND) (GE_ERROR | GE_USER | GE_IMMEDIATE),
@@ -78,7 +78,7 @@
(StatisticsProcessor) &acquireStatistics, this);
#endif
- if (res != OK)
+ if (res != GNUNET_OK)
GE_LOG(errorContext, (GE_KIND) (GE_ERROR | GE_USER | GE_IMMEDIATE),
qPrintable(tr("Error reading information from background process
gnunetd.")));
@@ -86,7 +86,7 @@
msleep(100);
}
- connection_destroy(sock);
+ GNUNET_client_connection_destroy(sock);
}
void GStatsThread::stop()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r5751 - in gnunet-qt: . src/core src/plugins/fs src/plugins/general src/plugins/stats,
gnunet <=