WvStreams
Main Page
Modules
Classes
Files
File List
File Members
urlget
wvhttpcomponent.cc
1
/*
2
* Worldvisions Weaver Software:
3
* Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4
*
5
* Componentization stuff for wvhttppool.h. Constitutes cheating.
6
*/
7
#include "wvhttppool.h"
8
#include "wvmoniker.h"
9
#include "wvistreamlist.h"
10
11
static
WvHttpPool
*pool;
12
13
14
static
void
pool_init()
15
{
16
// FIXME: we never free it!
17
if
(!pool)
18
{
19
pool =
new
WvHttpPool
;
20
WvIStreamList::globallist.append(pool,
false
,
"pool_init urlpool"
);
21
}
22
}
23
24
25
static
IWvStream
*creator(
WvStringParm
s,
IObject
*)
26
{
27
pool_init();
28
return
pool->addurl(
WvString
(
"http:%s"
, s),
"GET"
);
29
}
30
31
32
static
IWvStream
*screator(
WvStringParm
s,
IObject
*)
33
{
34
pool_init();
35
return
pool->addurl(
WvString
(
"https:%s"
, s),
"GET"
);
36
}
37
38
39
static
WvMoniker<IWvStream>
reg(
"http"
, creator);
40
static
WvMoniker<IWvStream>
regs(
"https"
, screator);
Generated on Thu Oct 31 2013 23:17:04 for WvStreams by
1.8.4