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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10832 - (show annotations) (download)
Sun Jan 5 18:03:34 2014 UTC (5 years, 10 months ago) by sgodin
File MIME type: text/plain
File size: 27561 byte(s)
-there is no need to keep maintaining the addTransport API on the DialogUsageManager object - SipStack has the exact same interface - marking as deprecated
1 #if !defined(RESIP_DIALOGUSAGEMANAGER_HXX)
2 #define RESIP_DIALOGUSAGEMANAGER_HXX
3
4 #include <vector>
5 #include <set>
6 #include <map>
7
8 #include "resip/stack/Headers.hxx"
9 #include "resip/dum/EventDispatcher.hxx"
10 #include "resip/dum/DialogEventInfo.hxx"
11 #include "resip/dum/DialogSet.hxx"
12 #include "resip/dum/DumTimeout.hxx"
13 #include "resip/dum/HandleManager.hxx"
14 #include "resip/dum/Handles.hxx"
15 #include "resip/dum/MergedRequestKey.hxx"
16 #include "resip/dum/RegistrationPersistenceManager.hxx"
17 #include "resip/dum/ServerSubscription.hxx"
18 #include "rutil/BaseException.hxx"
19 #include "rutil/SharedPtr.hxx"
20 #include "rutil/ThreadIf.hxx"
21 #include "resip/stack/SipStack.hxx"
22 #include "resip/stack/TransactionUser.hxx"
23 #include "resip/dum/DumFeature.hxx"
24 #include "resip/dum/DumFeatureChain.hxx"
25 #include "resip/dum/DumFeatureMessage.hxx"
26 #include "resip/dum/TargetCommand.hxx"
27 #include "resip/dum/ClientSubscriptionFunctor.hxx"
28 #include "resip/dum/ServerSubscriptionFunctor.hxx"
29
30 namespace resip
31 {
32
33 class Security;
34 class SipStack;
35 class FdSet;
36 class MasterProfile;
37 class RedirectManager;
38 class ClientAuthManager;
39 class ServerAuthManager;
40 class Uri;
41 class Contents;
42
43 class ClientRegistrationHandler;
44 class ServerRegistrationHandler;
45 class InviteSessionHandler;
46 class ClientSubscriptionHandler;
47 class ServerSubscriptionHandler;
48 class ClientPublicationHandler;
49 class ServerPublicationHandler;
50 class ClientPagerMessageHandler;
51 class ServerPagerMessageHandler;
52 class OutOfDialogHandler;
53 class RedirectHandler;
54 class DialogSetHandler;
55 class RequestValidationHandler;
56
57 class Dialog;
58 class InviteSessionCreator;
59
60 class AppDialogSetFactory;
61 class DumShutdownHandler;
62 class RemoteCertStore;
63
64 class KeepAliveManager;
65 class HttpGetMessage;
66
67 class ConnectionTerminated;
68
69 class Lockable;
70
71 class ExternalMessageBase;
72 class ExternalMessageHandler;
73
74 class DialogEventStateManager;
75 class DialogEventHandler;
76
77 class DialogUsageManager : public HandleManager, public TransactionUser
78 {
79 public:
80 class Exception : public BaseException
81 {
82 public:
83 Exception(const Data& msg,
84 const Data& file,
85 int line)
86 : BaseException(msg, file, line)
87 {}
88
89 virtual const char* name() const {return "DialogUsageManager::Exception";}
90 };
91
92 typedef enum
93 {
94 None = 0,
95 Sign,
96 Encrypt,
97 SignAndEncrypt
98 } EncryptionLevel;
99
100 // If createDefaultFeatures is true dum will construct a
101 // IdentityHandler->EncryptionManager chain.
102 DialogUsageManager(SipStack& stack, bool createDefaultFeatures=false);
103 virtual ~DialogUsageManager();
104
105 // !bwc! Maybe add a giveUpSeconds param to these.
106 void shutdown(DumShutdownHandler*);
107
108 // !bwc! This is not properly implemented (has an assert(0) in it).
109 // I am removing this declaration.
110 // void shutdownIfNoUsages(DumShutdownHandler*);
111
112 void forceShutdown(DumShutdownHandler*);
113
114 // Use SipStack::addTransport instead
115 RESIP_DEPRECATED(void addTransport( TransportType protocol,
116 int port=0,
117 IpVersion version=V4,
118 const Data& ipInterface = Data::Empty,
119 const Data& sipDomainname = Data::Empty, // only used
120 // for TLS
121 // based stuff
122 const Data& privateKeyPassPhrase = Data::Empty,
123 SecurityTypes::SSLType sslType = SecurityTypes::TLSv1,
124 unsigned transportFlags = 0));
125
126 SipStack& getSipStack();
127 const SipStack& getSipStack() const;
128 Security* getSecurity();
129
130 Data getHostAddress();
131
132 void setAppDialogSetFactory(std::auto_ptr<AppDialogSetFactory>);
133
134 void setMasterProfile(const SharedPtr<MasterProfile>& masterProfile);
135 SharedPtr<MasterProfile>& getMasterProfile();
136 SharedPtr<UserProfile>& getMasterUserProfile();
137
138 //optional handler to track the progress of DialogSets
139 void setDialogSetHandler(DialogSetHandler* handler);
140
141 void setKeepAliveManager(std::auto_ptr<KeepAliveManager> keepAlive);
142
143 //There is a default RedirectManager. Setting one may cause the old one
144 //to be deleted.
145 void setRedirectManager(std::auto_ptr<RedirectManager> redirect);
146 //informational, so a RedirectHandler is not required
147 void setRedirectHandler(RedirectHandler* handler);
148 RedirectHandler* getRedirectHandler();
149
150 /// If there is no ClientAuthManager, when the client receives a 401/407,
151 /// pass it up through the normal BaseUsageHandler
152 void setClientAuthManager(std::auto_ptr<ClientAuthManager> client);
153
154 /// If there is no ServerAuthManager, the server does not authenticate requests
155 void setServerAuthManager(resip::SharedPtr<ServerAuthManager> server);
156
157 /// If there is no such handler, calling makeInviteSession will throw and
158 /// receiving an INVITE as a UAS will respond with 405 Method Not Allowed.
159 void setInviteSessionHandler(InviteSessionHandler*);
160
161 /// If there is no such handler, calling makeRegistration will throw
162 void setClientRegistrationHandler(ClientRegistrationHandler*);
163
164 /// If no such handler, UAS will respond to REGISTER with 405 Method Not Allowed
165 void setServerRegistrationHandler(ServerRegistrationHandler*);
166
167 /// If there is no such handler, calling makeSubscription will throw
168 void addClientSubscriptionHandler(const Data& eventType, ClientSubscriptionHandler*);
169
170 /// If there is no such handler, calling makePublication will throw
171 void addClientPublicationHandler(const Data& eventType, ClientPublicationHandler*);
172
173 void addServerSubscriptionHandler(const Data& eventType, ServerSubscriptionHandler*);
174 void addServerPublicationHandler(const Data& eventType, ServerPublicationHandler*);
175
176 void addOutOfDialogHandler(MethodTypes, OutOfDialogHandler*);
177
178 void setRequestValidationHandler(RequestValidationHandler*);
179
180 void setClientPagerMessageHandler(ClientPagerMessageHandler*);
181 void setServerPagerMessageHandler(ServerPagerMessageHandler*);
182
183 /// Add/Remove External Message Handler
184 /// do following op when processing thread in not running
185 void addExternalMessageHandler(ExternalMessageHandler* handler);
186 void removeExternalMessageHandler(ExternalMessageHandler* handler);
187 void clearExternalMessageHandler();
188
189 /// Sets a manager to handle storage of registration state
190 void setRegistrationPersistenceManager(RegistrationPersistenceManager*);
191
192 void setRemoteCertStore(std::auto_ptr<RemoteCertStore> store);
193
194 // The message is owned by the underlying datastructure and may go away in
195 // the future. If the caller wants to keep it, it should make a copy. The
196 // memory will exist at least up until the point where the application
197 // calls DialogUsageManager::send(msg);
198 SharedPtr<SipMessage> makeInviteSession(const NameAddr& target, const SharedPtr<UserProfile>& userProfile, const Contents* initialOffer, AppDialogSet* ads = 0);
199 SharedPtr<SipMessage> makeInviteSession(const NameAddr& target, const Contents* initialOffer, AppDialogSet* ads = 0);
200 SharedPtr<SipMessage> makeInviteSession(const NameAddr& target, const SharedPtr<UserProfile>& userProfile, const Contents* initialOffer, EncryptionLevel level, const Contents* alternative = 0, AppDialogSet* ads = 0);
201 SharedPtr<SipMessage> makeInviteSession(const NameAddr& target, const Contents* initialOffer, EncryptionLevel level, const Contents* alternative = 0, AppDialogSet* ads = 0);
202 // Versions that add a replaces header
203 SharedPtr<SipMessage> makeInviteSession(const NameAddr& target, InviteSessionHandle sessionToReplace, const SharedPtr<UserProfile>& userProfile, const Contents* initialOffer, AppDialogSet* ads = 0);
204 SharedPtr<SipMessage> makeInviteSession(const NameAddr& target, InviteSessionHandle sessionToReplace, const SharedPtr<UserProfile>& userProfile, const Contents* initialOffer, EncryptionLevel level = None, const Contents* alternative = 0, AppDialogSet* ads = 0);
205 SharedPtr<SipMessage> makeInviteSession(const NameAddr& target, InviteSessionHandle sessionToReplace, const Contents* initialOffer, EncryptionLevel level = None, const Contents* alternative = 0, AppDialogSet* ads = 0);
206
207 //will send a Notify(100)...currently can be decorated through the
208 //OnReadyToSend callback. Probably will change it's own callback/handler soon
209 SharedPtr<SipMessage> makeInviteSessionFromRefer(const SipMessage& refer, ServerSubscriptionHandle,
210 const Contents* initialOffer, AppDialogSet* = 0);
211 SharedPtr<SipMessage> makeInviteSessionFromRefer(const SipMessage& refer, const SharedPtr<UserProfile>& userProfile,
212 const Contents* initialOffer, AppDialogSet* appDs = 0);
213 SharedPtr<SipMessage> makeInviteSessionFromRefer(const SipMessage& refer, ServerSubscriptionHandle,
214 const Contents* initialOffer, EncryptionLevel level = None, const Contents* alternative = 0, AppDialogSet* = 0);
215 SharedPtr<SipMessage> makeInviteSessionFromRefer(const SipMessage& refer, const SharedPtr<UserProfile>& userProfile, ServerSubscriptionHandle,
216 const Contents* initialOffer, EncryptionLevel level = None, const Contents* alternative = 0, AppDialogSet* = 0);
217
218 SharedPtr<SipMessage> makeSubscription(const NameAddr& target, const SharedPtr<UserProfile>& userProfile, const Data& eventType, AppDialogSet* = 0);
219 SharedPtr<SipMessage> makeSubscription(const NameAddr& target, const SharedPtr<UserProfile>& userProfile, const Data& eventType,
220 UInt32 subscriptionTime, AppDialogSet* = 0);
221 SharedPtr<SipMessage> makeSubscription(const NameAddr& target, const SharedPtr<UserProfile>& userProfile, const Data& eventType,
222 UInt32 subscriptionTime, int refreshInterval, AppDialogSet* = 0);
223 SharedPtr<SipMessage> makeSubscription(const NameAddr& target, const Data& eventType, AppDialogSet* = 0);
224 SharedPtr<SipMessage> makeSubscription(const NameAddr& target, const Data& eventType, UInt32 subscriptionTime, AppDialogSet* = 0);
225 SharedPtr<SipMessage> makeSubscription(const NameAddr& target, const Data& eventType,
226 UInt32 subscriptionTime, int refreshInterval, AppDialogSet* = 0);
227
228 //unsolicited refer
229 SharedPtr<SipMessage> makeRefer(const NameAddr& target, const SharedPtr<UserProfile>& userProfile, const H_ReferTo::Type& referTo, AppDialogSet* = 0);
230 SharedPtr<SipMessage> makeRefer(const NameAddr& target, const H_ReferTo::Type& referTo, AppDialogSet* = 0);
231
232 SharedPtr<SipMessage> makePublication(const NameAddr& target,
233 const SharedPtr<UserProfile>& userProfile,
234 const Contents& body,
235 const Data& eventType,
236 UInt32 expiresSeconds,
237 AppDialogSet* = 0);
238 SharedPtr<SipMessage> makePublication(const NameAddr& target,
239 const Contents& body,
240 const Data& eventType,
241 UInt32 expiresSeconds,
242 AppDialogSet* = 0);
243
244 SharedPtr<SipMessage> makeRegistration(const NameAddr& target, const SharedPtr<UserProfile>& userProfile, AppDialogSet* = 0);
245 SharedPtr<SipMessage> makeRegistration(const NameAddr& target, const SharedPtr<UserProfile>& userProfile, UInt32 registrationTime, AppDialogSet* = 0);
246 SharedPtr<SipMessage> makeRegistration(const NameAddr& target, AppDialogSet* = 0);
247 SharedPtr<SipMessage> makeRegistration(const NameAddr& target, UInt32 registrationTime, AppDialogSet* = 0);
248
249 SharedPtr<SipMessage> makeOutOfDialogRequest(const NameAddr& target, const SharedPtr<UserProfile>& userProfile, const MethodTypes meth, AppDialogSet* = 0);
250 SharedPtr<SipMessage> makeOutOfDialogRequest(const NameAddr& target, const MethodTypes meth, AppDialogSet* = 0);
251
252 ClientPagerMessageHandle makePagerMessage(const NameAddr& target, const SharedPtr<UserProfile>& userProfile, AppDialogSet* = 0);
253 ClientPagerMessageHandle makePagerMessage(const NameAddr& target, AppDialogSet* = 0);
254
255 void end(DialogSetId invSessionId);
256 void send(SharedPtr<SipMessage> request);
257 void sendCommand(SharedPtr<SipMessage> request);
258
259 class SendCommand : public DumCommandAdapter
260 {
261 public:
262 SendCommand(SharedPtr<SipMessage> request,
263 DialogUsageManager& dum):
264 mRequest(request),
265 mDum(dum)
266 {}
267
268 virtual ~SendCommand(){}
269
270 virtual void executeCommand()
271 {
272 mDum.send(mRequest);
273 }
274
275 virtual EncodeStream& encodeBrief(EncodeStream& strm) const
276 {
277 return strm << "DialogUsageManager::SendCommand" << std::endl;
278 }
279
280 protected:
281 SharedPtr<SipMessage> mRequest;
282 DialogUsageManager& mDum;
283 };
284
285 //void send(SipMessage& request, EncryptionLevel level);
286
287 // give dum an opportunity to handle its events. If process() returns true
288 // there are more events to process.
289 bool hasEvents() const;
290 bool process(Lockable* mutex = NULL); // non-blocking
291 bool process(int timeoutMs, Lockable* mutex = NULL); // Specify -1 for infinte timeout
292
293 AppDialogHandle findAppDialog(const DialogId& id);
294 AppDialogSetHandle findAppDialogSet(const DialogSetId& id);
295
296 InviteSessionHandle findInviteSession(DialogId id);
297 //if the handle is inValid, int represents the errorcode
298 std::pair<InviteSessionHandle, int> findInviteSession(CallId replaces);
299
300 ClientPublicationHandler* getClientPublicationHandler(const Data& eventType);
301 ServerPublicationHandler* getServerPublicationHandler(const Data& eventType);
302
303 ClientSubscriptionHandler* getClientSubscriptionHandler(const Data& eventType);
304 ServerSubscriptionHandler* getServerSubscriptionHandler(const Data& eventType);
305
306 // will apply the specified functor(which takes a
307 //ServerSubscriptionHandle) to each matching ServerSubscription.
308 //Returns the functor after the last application.
309 template<typename UnaryFunction>
310 UnaryFunction applyToServerSubscriptions(const Data& aor,
311 const Data& eventType,
312 UnaryFunction applyFn)
313 {
314 Data key = eventType + aor;
315 std::pair<ServerSubscriptions::iterator,ServerSubscriptions::iterator>
316 range = mServerSubscriptions.equal_range(key);
317
318 for (ServerSubscriptions::iterator i=range.first; i!=range.second; ++i)
319 {
320 ServerSubscriptionHandle h = i->second->getHandle();
321 applyFn(h);
322 }
323 return applyFn;
324 }
325
326 //DUM will delete features in its destructor. Feature manipulation should
327 //be done before any processing starts.
328 //ServerAuthManager is now a DumFeature; setServerAuthManager is a special
329 //case of addFeature; the ServerAuthManager should always be the first
330 //feature in the chain.
331 void addIncomingFeature(resip::SharedPtr<DumFeature> feat);
332 void addOutgoingFeature(resip::SharedPtr<DumFeature> feat);
333
334 void setOutgoingMessageInterceptor(resip::SharedPtr<DumFeature> feat);
335
336 TargetCommand::Target& dumIncomingTarget();
337
338 TargetCommand::Target& dumOutgoingTarget();
339
340 //exposed so DumThread variants can be written
341 Message* getNext(int ms) { return mFifo.getNext(ms); }
342 void internalProcess(std::auto_ptr<Message> msg);
343 bool messageAvailable(void) { return mFifo.messageAvailable(); }
344
345 void applyToAllClientSubscriptions(ClientSubscriptionFunctor*);
346 void applyToAllServerSubscriptions(ServerSubscriptionFunctor*);
347
348 /// Note: Implementations of Postable must delete the message passed via post
349 void registerForConnectionTermination(Postable*);
350 void unRegisterForConnectionTermination(Postable*);
351
352 // The DialogEventStateManager is returned so that the client can query it for
353 // the current set of active dialogs (useful when accepting a dialog event subscription).
354 // The caller is responsible for deleting the DialogEventStateManager
355 // at the same time it deletes other handlers when DUM is destroyed.
356 DialogEventStateManager* createDialogEventStateManager(DialogEventHandler* handler);
357
358 void setAdvertisedCapabilities(SipMessage& msg, SharedPtr<UserProfile> userProfile);
359
360 protected:
361 virtual void onAllHandlesDestroyed();
362 //TransactionUser virtuals
363 virtual const Data& name() const;
364 friend class DumThread;
365
366 DumFeatureChain::FeatureList mIncomingFeatureList;
367 DumFeatureChain::FeatureList mOutgoingFeatureList;
368
369 SharedPtr<DumFeature> mOutgoingMessageInterceptor;
370
371 typedef std::map<Data, DumFeatureChain*> FeatureChainMap;
372 FeatureChainMap mIncomingFeatureChainMap;
373 FeatureChainMap mOutgoingFeatureChainMap;
374
375 private:
376 friend class Dialog;
377 friend class DialogSet;
378
379 friend class ClientInviteSession;
380 friend class ClientOutOfDialogReq;
381 friend class ClientPublication;
382 friend class ClientRegistration;
383 friend class ClientSubscription;
384 friend class InviteSession;
385 friend class ServerInviteSession;
386 friend class ServerOutOfDialogReq;
387 friend class ServerPublication;
388 friend class ServerRegistration;
389 friend class ServerSubscription;
390 friend class BaseUsage;
391 friend class ClientPagerMessage;
392 friend class ServerPagerMessage;
393 friend class KeepAliveAssociation;
394 friend class NetworkAssociation;
395
396 friend class MergedRequestRemovalCommand;
397 friend class TargetCommand::Target;
398
399 class IncomingTarget : public TargetCommand::Target
400 {
401 public:
402 IncomingTarget(DialogUsageManager& dum) : TargetCommand::Target(dum)
403 {
404 }
405
406 virtual void post(std::auto_ptr<Message> msg)
407 {
408 mDum.incomingProcess(msg);
409 }
410 };
411
412 class OutgoingTarget : public TargetCommand::Target
413 {
414 public:
415 OutgoingTarget(DialogUsageManager& dum) : TargetCommand::Target(dum)
416 {
417 }
418
419 virtual void post(std::auto_ptr<Message> msg)
420 {
421 mDum.outgoingProcess(msg);
422 }
423 };
424
425 DialogSet* makeUacDialogSet(BaseCreator* creator, AppDialogSet* appDs);
426 SharedPtr<SipMessage> makeNewSession(BaseCreator* creator, AppDialogSet* appDs);
427
428 // makes a proto response to a request
429 void makeResponse(SipMessage& response,
430 const SipMessage& request,
431 int responseCode,
432 const Data& reason = Data::Empty) const;
433 // May call a callback to let the app adorn
434 void sendResponse(const SipMessage& response);
435
436 void sendUsingOutboundIfAppropriate(UserProfile& userProfile, std::auto_ptr<SipMessage> msg);
437
438 void addTimer(DumTimeout::Type type,
439 unsigned long durationSeconds,
440 BaseUsageHandle target,
441 unsigned int seq,
442 unsigned int altseq=0);
443
444 void addTimerMs(DumTimeout::Type type,
445 unsigned long duration,
446 BaseUsageHandle target,
447 unsigned int seq,
448 unsigned int altseq=0,
449 const Data &transactionId = Data::Empty);
450
451 Dialog& findOrCreateDialog(const SipMessage* msg);
452 Dialog* findDialog(const DialogId& id);
453 DialogSet* findDialogSet(const DialogSetId& id);
454
455 // return 0, if no matching BaseCreator
456 BaseCreator* findCreator(const DialogId& id);
457
458 void processRequest(const SipMessage& request);
459 void processResponse(const SipMessage& response);
460 bool validateRequestURI(const SipMessage& request);
461 bool validateRequiredOptions(const SipMessage& request);
462 bool validateContent(const SipMessage& request);
463 bool validateAccept(const SipMessage& request);
464 bool validateTo(const SipMessage& request);
465 bool validate100RelSupport(const SipMessage& request);
466
467 bool mergeRequest(const SipMessage& request);
468
469 void processPublish(const SipMessage& publish);
470
471 void removeDialogSet(const DialogSetId& );
472
473 bool checkEventPackage(const SipMessage& request);
474
475 bool queueForIdentityCheck(SipMessage* msg);
476 void processIdentityCheckResponse(const HttpGetMessage& msg);
477
478 void incomingProcess(std::auto_ptr<Message> msg);
479 void outgoingProcess(std::auto_ptr<Message> msg);
480 void processExternalMessage(ExternalMessageBase* externalMessage);
481
482 // For delayed delete of a Usage
483 void destroy(const BaseUsage* usage);
484 void destroy(DialogSet*);
485 void destroy(Dialog*);
486
487 void requestMergedRequestRemoval(const MergedRequestKey&);
488 void removeMergedRequest(const MergedRequestKey&);
489
490 typedef std::set<MergedRequestKey> MergedRequests;
491 MergedRequests mMergedRequests;
492
493 typedef std::map<Data, DialogSet*> CancelMap;
494 CancelMap mCancelMap;
495
496 typedef HashMap<DialogSetId, DialogSet*> DialogSetMap;
497 DialogSetMap mDialogSetMap;
498
499 SharedPtr<MasterProfile> mMasterProfile;
500 SharedPtr<UserProfile> mMasterUserProfile;
501 std::auto_ptr<RedirectManager> mRedirectManager;
502 std::auto_ptr<ClientAuthManager> mClientAuthManager;
503 //std::auto_ptr<ServerAuthManager> mServerAuthManager;
504
505 InviteSessionHandler* mInviteSessionHandler;
506 ClientRegistrationHandler* mClientRegistrationHandler;
507 ServerRegistrationHandler* mServerRegistrationHandler;
508 RedirectHandler* mRedirectHandler;
509 DialogSetHandler* mDialogSetHandler;
510 RequestValidationHandler* mRequestValidationHandler;
511
512 RegistrationPersistenceManager *mRegistrationPersistenceManager;
513
514 OutOfDialogHandler* getOutOfDialogHandler(const MethodTypes type);
515
516 std::map<Data, ClientSubscriptionHandler*> mClientSubscriptionHandlers;
517 std::map<Data, ServerSubscriptionHandler*> mServerSubscriptionHandlers;
518 std::map<Data, ClientPublicationHandler*> mClientPublicationHandlers;
519 std::map<Data, ServerPublicationHandler*> mServerPublicationHandlers;
520 std::map<MethodTypes, OutOfDialogHandler*> mOutOfDialogHandlers;
521 std::auto_ptr<KeepAliveManager> mKeepAliveManager;
522 bool mIsDefaultServerReferHandler;
523
524 ClientPagerMessageHandler* mClientPagerMessageHandler;
525 ServerPagerMessageHandler* mServerPagerMessageHandler;
526 std::vector<ExternalMessageHandler*> mExternalMessageHandlers;
527
528 // a pointer because we'll only initialize if we add a
529 // server subscription handler for the 'dialog' event...
530 DialogEventStateManager* mDialogEventStateManager;
531
532 std::auto_ptr<AppDialogSetFactory> mAppDialogSetFactory;
533
534 SipStack& mStack;
535 DumShutdownHandler* mDumShutdownHandler;
536 typedef enum
537 {
538 Running,
539 ShutdownRequested, // while ending usages
540 RemovingTransactionUser, // while removing TU from stack
541 Shutdown, // after TU has been removed from stack
542 Destroying // while calling destructor
543 } ShutdownState;
544 ShutdownState mShutdownState;
545
546 // from ETag -> ServerPublication
547 typedef std::map<Data, ServerPublication*> ServerPublications;
548 ServerPublications mServerPublications;
549 typedef std::map<Data, SipMessage*> RequiresCerts;
550 RequiresCerts mRequiresCerts;
551 // from Event-Type+document-aor -> ServerSubscription
552 // Managed by ServerSubscription
553 typedef std::multimap<Data, ServerSubscription*> ServerSubscriptions;
554 ServerSubscriptions mServerSubscriptions;
555
556 IncomingTarget* mIncomingTarget;
557 OutgoingTarget* mOutgoingTarget;
558 ThreadIf::TlsKey mThreadDebugKey;
559 ThreadIf::TlsKey mHiddenThreadDebugKey;
560
561 EventDispatcher<ConnectionTerminated> mConnectionTerminatedEventDispatcher;
562 };
563
564 }
565
566 #endif
567
568 /* ====================================================================
569 * The Vovida Software License, Version 1.0
570 *
571 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
572 *
573 * Redistribution and use in source and binary forms, with or without
574 * modification, are permitted provided that the following conditions
575 * are met:
576 *
577 * 1. Redistributions of source code must retain the above copyright
578 * notice, this list of conditions and the following disclaimer.
579 *
580 * 2. Redistributions in binary form must reproduce the above copyright
581 * notice, this list of conditions and the following disclaimer in
582 * the documentation and/or other materials provided with the
583 * distribution.
584 *
585 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
586 * and "Vovida Open Communication Application Library (VOCAL)" must
587 * not be used to endorse or promote products derived from this
588 * software without prior written permission. For written
589 * permission, please contact vocal@vovida.org.
590 *
591 * 4. Products derived from this software may not be called "VOCAL", nor
592 * may "VOCAL" appear in their name, without prior written
593 * permission of Vovida Networks, Inc.
594 *
595 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
596 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
597 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
598 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
599 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
600 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
601 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
602 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
603 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
604 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
605 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
606 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
607 * DAMAGE.
608 *
609 * ====================================================================
610 *
611 * This software consists of voluntary contributions made by Vovida
612 * Networks, Inc. and many individuals on behalf of Vovida Networks,
613 * Inc. For more information on Vovida Networks, Inc., please see
614 * <http://www.vovida.org/>.
615 *
616 */

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