/[resiprocate]/main/resip/dum/HttpProvider.hxx
ViewVC logotype

Contents of /main/resip/dum/HttpProvider.hxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5948 - (show annotations) (download)
Fri Feb 17 15:30:16 2006 UTC (13 years, 9 months ago) by dworley
File MIME type: text/plain
File size: 3581 byte(s)
Setting more svn: properties, and adding EOLs to the ends of files
that need it.

1 #ifndef RESIP_HttpProvider
2 #define RESIP_HttpProvider
3
4 #include "rutil/Mutex.hxx"
5 #include "resip/dum/TargetCommand.hxx"
6 #include <memory>
7
8 namespace resip
9 {
10 class TransactionUser;
11 class Data;
12 class GenericUri;
13 class TargetCommand;
14
15 //To provide this functionality, plug in an instance of
16 //HttpProviderFactory(before any instances of DialogUsageManager/SipStack are
17 //created. Null will be returned by default.
18 class HttpProviderFactory;
19
20 class HttpProvider
21 {
22 public:
23 //HttpProvider assumes memory
24 static void setFactory(std::auto_ptr<HttpProviderFactory> fact);
25 //ptr so users can check for existence
26 static HttpProvider* instance();
27
28 //.dcm. tu param will become a postable
29 virtual void get(const GenericUri& target, const Data& tid, TransactionUser& tu, TargetCommand::Target& commandTarget)=0;
30 virtual ~HttpProvider(){} //impl. singleton destructor pattern later
31 private:
32 static HttpProvider* mInstance;
33 static std::auto_ptr<HttpProviderFactory> mFactory;
34 static Mutex mMutex;
35 };
36
37 class HttpProviderFactory
38 {
39 public:
40 virtual HttpProvider* createHttpProvider()=0;
41 virtual ~HttpProviderFactory(){}
42 };
43 }
44
45 #endif
46
47 /* ====================================================================
48 * The Vovida Software License, Version 1.0
49 *
50 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
51 *
52 * Redistribution and use in source and binary forms, with or without
53 * modification, are permitted provided that the following conditions
54 * are met:
55 *
56 * 1. Redistributions of source code must retain the above copyright
57 * notice, this list of conditions and the following disclaimer.
58 *
59 * 2. Redistributions in binary form must reproduce the above copyright
60 * notice, this list of conditions and the following disclaimer in
61 * the documentation and/or other materials provided with the
62 * distribution.
63 *
64 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
65 * and "Vovida Open Communication Application Library (VOCAL)" must
66 * not be used to endorse or promote products derived from this
67 * software without prior written permission. For written
68 * permission, please contact vocal@vovida.org.
69 *
70 * 4. Products derived from this software may not be called "VOCAL", nor
71 * may "VOCAL" appear in their name, without prior written
72 * permission of Vovida Networks, Inc.
73 *
74 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
75 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
76 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
77 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
78 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
79 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
80 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
81 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
82 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
83 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
84 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
85 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
86 * DAMAGE.
87 *
88 * ====================================================================
89 *
90 * This software consists of voluntary contributions made by Vovida
91 * Networks, Inc. and many individuals on behalf of Vovida Networks,
92 * Inc. For more information on Vovida Networks, Inc., please see
93 * <http://www.vovida.org/>.
94 *
95 */

Properties

Name Value
svn:eol-style native
svn:mime-type text/plain

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27