[spring] 12/28: Imported Upstream version 101.0+dfsg

Markus Koschany apo-guest at moszumanska.debian.org
Sat Mar 5 21:48:01 UTC 2016


This is an automated email from the git hooks/post-receive script.

apo-guest pushed a commit to branch master
in repository spring.

commit 0abcc40caa2de7079d8c248de84671c7bc8c5d97
Author: Markus Koschany <apo at debian.org>
Date:   Sat Mar 5 14:37:04 2016 +0100

    Imported Upstream version 101.0+dfsg
---
 tools/pr-downloader/src/pr-downloader.h | 98 +++++++++++++++++++++++++++++++++
 1 file changed, 98 insertions(+)

diff --git a/tools/pr-downloader/src/pr-downloader.h b/tools/pr-downloader/src/pr-downloader.h
new file mode 100644
index 0000000..9770b7b
--- /dev/null
+++ b/tools/pr-downloader/src/pr-downloader.h
@@ -0,0 +1,98 @@
+/*
+	header for pr-downloader
+*/
+
+
+#ifndef PR_DOWNLOADER_H
+#define PR_DOWNLOADER_H
+
+#include "Downloader/DownloadEnum.h"
+
+#define NAME_LEN 1024
+struct downloadInfo {
+	char filename[NAME_LEN];
+	bool validated;
+	int speed;
+	DownloadEnum::Category cat;
+};
+/**
+	downloads all downloads that where added with @DownloadAdd
+	clears search results
+*/
+extern int DownloadStart();
+
+/**
+	adds a download by url without searching
+*/
+extern int DownloadAddByUrl(DownloadEnum::Category cat, const char* filename, const char* url);
+
+/**
+	adds a download, see @DownloadSearch & @DownloadGetSearchInfo
+*/
+extern bool DownloadAdd(unsigned int id);
+/**
+* search for name
+* calling this will overwrite results from the last call
+* @return count of results
+* @see downloadSearchGetId
+*/
+extern int DownloadSearch(DownloadEnum::Category category, const char* name);
+
+/**
+*	get info about a result / current download
+*/
+extern bool DownloadGetInfo(int id, downloadInfo& info);
+
+/**
+*	Initialize the lib
+*/
+extern void DownloadInit();
+/**
+*	shut down the lib
+*/
+extern void DownloadShutdown();
+
+enum CONFIG {
+	CONFIG_FILESYSTEM_WRITEPATH = 1, //const char, sets the output directory
+	CONFIG_FETCH_DEPENDS, //bool, automaticly fetch depending files
+	CONFIG_RAPID_FORCEUPDATE, //bool, always fetch repo files
+};
+
+/**
+*	Set an option string
+*/
+extern bool DownloadSetConfig(CONFIG type, const void* value);
+
+/**
+* returns config value, NULL when failed
+*/
+extern bool DownloadGetConfig(CONFIG type, const void** value);
+
+/**
+* validate rapid pool
+* @param deletebroken files
+*/
+extern bool DownloadRapidValidate(bool deletebroken);
+
+/**
+* dump contents of a sdp
+*/
+extern bool DownloadDumpSDP(const char* path);
+
+/**
+* control printing to stdout
+*/
+extern void DownloadDisableLogging(bool disableLogging);
+
+typedef void (*IDownloaderProcessUpdateListener)(int done, int size);
+
+extern void SetDownloadListener(IDownloaderProcessUpdateListener listener);
+
+/*
+ * Calculate hash and return it in base64 format.
+ * Accepted values for type are:
+ *   0 - md5
+*/
+extern char* CalcHash(const char* str, int size, int type);
+#endif
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/spring.git



More information about the Pkg-games-commits mailing list