xref: /haiku/headers/private/netservices/UrlResult.h (revision d0834b34d523dff018ef0551e195fd9109daa93f)
1 /*
2  * Copyright 2010-2017 Haiku Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _B_URL_RESULT_H_
6 #define _B_URL_RESULT_H_
7 
8 
9 #include <String.h>
10 
11 
12 #ifdef LIBNETAPI_DEPRECATED
13 #include <Archivable.h>
14 
15 
16 class BUrlResult: public BArchivable {
17 public:
18 							BUrlResult();
19 							BUrlResult(BMessage*);
20 	virtual					~BUrlResult();
21 
22 	virtual	status_t		Archive(BMessage*, bool) const;
23 
24 			void			SetContentType(BString contentType);
25 			void			SetLength(size_t length);
26 
27 	virtual	BString			ContentType() const;
28 	virtual size_t			Length() const;
29 
30 	static	BArchivable*	Instantiate(BMessage*);
31 
32 private:
33 			BString			fContentType;
34 			size_t			fLength;
35 };
36 
37 #else
38 
39 namespace BPrivate {
40 
41 namespace Network {
42 
43 class BUrlResult {
44 public:
45 							BUrlResult();
46 	virtual					~BUrlResult();
47 
48 			void			SetContentType(BString contentType);
49 			void			SetLength(off_t length);
50 
51 	virtual	BString			ContentType() const;
52 	virtual	off_t			Length() const;
53 
54 private:
55 			BString			fContentType;
56 			off_t			fLength;
57 };
58 
59 }
60 
61 }
62 
63 #endif // LIBNETAPI_DEPRECATED
64 
65 #endif // _B_URL_RESULT_H_
66