2013-12-09 23:26:13 +04:00
|
|
|
/*
|
2017-01-29 21:25:02 +03:00
|
|
|
* Copyright 2010-2017 Haiku Inc. All rights reserved.
|
2013-12-09 23:26:13 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _B_URL_RESULT_H_
|
|
|
|
#define _B_URL_RESULT_H_
|
|
|
|
|
|
|
|
|
|
|
|
#include <String.h>
|
|
|
|
|
|
|
|
|
2020-07-18 06:58:55 +03:00
|
|
|
#ifdef LIBNETAPI_DEPRECATED
|
|
|
|
#include <Archivable.h>
|
2021-01-22 17:20:19 +03:00
|
|
|
|
|
|
|
|
2017-01-29 21:25:02 +03:00
|
|
|
class BUrlResult: public BArchivable {
|
2013-12-09 23:26:13 +04:00
|
|
|
public:
|
2017-01-29 21:25:02 +03:00
|
|
|
BUrlResult();
|
|
|
|
BUrlResult(BMessage*);
|
2013-12-09 23:26:13 +04:00
|
|
|
virtual ~BUrlResult();
|
2017-01-29 21:25:02 +03:00
|
|
|
|
|
|
|
virtual status_t Archive(BMessage*, bool) const;
|
|
|
|
|
2013-12-09 23:26:13 +04:00
|
|
|
void SetContentType(BString contentType);
|
|
|
|
void SetLength(size_t length);
|
|
|
|
|
|
|
|
virtual BString ContentType() const;
|
|
|
|
virtual size_t Length() const;
|
|
|
|
|
2017-01-29 21:25:02 +03:00
|
|
|
static BArchivable* Instantiate(BMessage*);
|
|
|
|
|
2013-12-09 23:26:13 +04:00
|
|
|
private:
|
|
|
|
BString fContentType;
|
|
|
|
size_t fLength;
|
|
|
|
};
|
|
|
|
|
2020-07-18 06:58:55 +03:00
|
|
|
#else
|
|
|
|
|
|
|
|
namespace BPrivate {
|
|
|
|
|
|
|
|
namespace Network {
|
|
|
|
|
|
|
|
class BUrlResult {
|
|
|
|
public:
|
|
|
|
BUrlResult();
|
|
|
|
virtual ~BUrlResult();
|
|
|
|
|
|
|
|
void SetContentType(BString contentType);
|
|
|
|
void SetLength(off_t length);
|
|
|
|
|
|
|
|
virtual BString ContentType() const;
|
|
|
|
virtual off_t Length() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
BString fContentType;
|
|
|
|
off_t fLength;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2021-01-22 17:20:19 +03:00
|
|
|
|
2020-07-18 06:58:55 +03:00
|
|
|
#endif // LIBNETAPI_DEPRECATED
|
2021-01-22 17:20:19 +03:00
|
|
|
|
2020-07-18 06:58:55 +03:00
|
|
|
#endif // _B_URL_RESULT_H_
|