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