WvStreams
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
11static WvHttpPool *pool;
12
13
14static 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
25static IWvStream *creator(WvStringParm s, IObject*)
26{
27 pool_init();
28 return pool->addurl(WvString("http:%s", s), "GET");
29}
30
31
32static IWvStream *screator(WvStringParm s, IObject*)
33{
34 pool_init();
35 return pool->addurl(WvString("https:%s", s), "GET");
36}
37
38
39static WvMoniker<IWvStream> reg("http", creator);
40static WvMoniker<IWvStream> regs("https", screator);
The basic interface which is included by all other XPLC interfaces and objects.
Definition: IObject.h:65
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
Definition: wvstring.h:94
A type-safe version of WvMonikerBase that lets you provide create functions for object types other th...
Definition: wvmoniker.h:62
WvString is an implementation of a simple and efficient printable-string class.
Definition: wvstring.h:330