2009-11-12 Jeffrey Stedfast <fejj@novell.com>
[moon.git] / src / internal-downloader.h
blobecdd974bd212a58b476244c0dcf3744fea0bc602
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;
40 virtual void SetFilename (const char *fname) = 0;
43 #endif /* __INTERNAL_DOWNLOADER_H__ */