1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * file-downloader.h: File Downloader class.
6 * Moonlight List (moonlight-list@lists.ximian.com)
8 * Copyright 2008 Novell, Inc. (http://www.novell.com)
10 * See the LICENSE file included with the distribution for details.
14 #ifndef __FILE_DOWNLOADER_H__
15 #define __FILE_DOWNLOADER_H__
19 #include "internal-downloader.h"
20 #include "downloader.h"
22 class FileDownloader
: public InternalDownloader
{
31 bool DownloadedFileIsZipped ();
32 void CleanupUnzipDir ();
34 virtual ~FileDownloader ();
37 FileDownloader (Downloader
*dl
);
39 virtual void Open (const char *verb
, const char *uri
);
40 virtual void Write (void *buf
, gint32 offset
, gint32 n
);
41 virtual char *GetDownloadedFilename (const char *partname
);
42 virtual char *GetResponseText (const char *partname
, gint64
*size
);
44 const char *GetDownloadedFile ();
46 const char *GetUnzippedPath ();
48 virtual void SetFilename (const char *fname
) { g_free (filename
); filename
= g_strdup (fname
); }
49 void SetUnlink (bool value
) { unlinkit
= value
; }
52 #endif /* __FILE_DOWNLOADER_H__ */