WinInetStorage.cxx revision 7c478bd95313f5f23a4c958a745db2134aa03244
// Copyright (c) 1996 James Clark
// See the file COPYING for copying permission.
#pragma ident "%Z%%M% %I% %E% SMI"
#include "splib.h"
#ifdef SP_WININET
#include "WinInetStorage.h"
#include "WinInetStorageMessages.h"
#include "RewindStorageObject.h"
#include "UnivCharsetDesc.h"
#include "MessageArg.h"
#include "MessageBuilder.h"
#include "macros.h"
#define STRICT
#include <windows.h>
#include <wininet.h>
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
#endif
{
s += buf[i];
s += '\0';
return s;
}
class Win32MessageArg : public MessageArg {
public:
void append(MessageBuilder &) const;
private:
};
{
void *msg;
0,
n_,
0,
0)) {
// FIXME interpret common internet messages here
return;
}
s += *tem;
}
class WinInetStorageObject : public RewindStorageObject {
public:
private:
void operator=(const WinInetStorageObject &); // undefined
};
{
}
{
if (session_) {
session_ = 0;
}
}
const char *WinInetStorageManager::type() const
{
return type_;
}
{
if (!session_) {
0,
0,
0);
}
return 1;
}
const CharsetInfo &charset) const
{
return 0;
size_t i = 0;
// guess other schemes supported by download protocols
for (const char *s = "http://"; *s; s++, i++)
return 0;
return 1;
}
{
if (!initSession())
return 0;
if (!fd) {
return 0;
}
// FIXME report an error
}
Boolean) const
{
buf,
&bufSize,
0)) {
delete [] buf;
return 1;
}
delete [] buf;
return 0;
}
Messenger &) const
{
if (fold)
if (c <= (unsigned char)-1)
}
return 1;
}
{
}
{
if (fd_ != 0) {
(void)InternetCloseHandle(fd_);
fd_ = 0;
}
}
{
return 1;
return 0;
DWORD n;
return 0;
}
if (n) {
nread = n;
return 1;
}
eof_ = 1;
fd_ = 0;
return 0;
}
{
return 0;
}
#ifdef SP_NAMESPACE
}
#endif
#endif /* SP_WININET */