2009-06-17 Jeffrey Stedfast <fejj@novell.com>
[moon.git] / src / internal-downloader.h
blobceafb47b02d45e7e0a7f7cd5865cb05a19af10d2
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * downloader.h: Downloader class.
5 * Contact:
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 __INTERNAL_DOWNLOADER_H__
15 #define __INTERNAL_DOWNLOADER_H__
17 class InternalDownloader;
19 #include "dependencyobject.h"
21 class Downloader;
23 class InternalDownloader : public EventObject {
24 protected:
25 Downloader *dl;
27 virtual ~InternalDownloader () {}
29 public:
30 InternalDownloader (Downloader *dl, Type::Kind type)
31 : EventObject (type)
33 this->dl = dl;
36 virtual void Open (const char *verb, const char *uri) = 0;
37 virtual void Write (void *buf, gint32 offset, gint32 n) = 0;
38 virtual char *GetResponseText (const char *partname, gint64 *size) = 0;
39 virtual char *GetDownloadedFilename (const char *partname) = 0;
42 #endif /* __INTERNAL_DOWNLOADER_H__ */