reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
AsyncID.hxx
Go to the documentation of this file.
1
#if !defined(RESIP_ASYNC_ID_HXX)
2
#define RESIP_ASYNC_ID_HXX
3
4
namespace
resip
5
{
6
7
// ?dcm? -- I originally wanted a flexible class that would map to any asyncronous
8
// completetion token. One way to do this is with templates in the function
9
// that accept Async ids, another way is to have them passed around by
10
// reference, but in the CounterPath case(for example) ids are simle ulongs, so this
11
// would cause a lot of work in the glue code. Of course, this definition is
12
// located here, so it would be easy to change to a lightweight wrapper class to
13
// other implementation. A templatized class w/ a conversion operator would
14
// work.
15
// sometimes GC and handles make life easier. Of course the template approach
16
// could involve ref. counting when necessary.
17
18
//should be small enough to happily pass by value
19
// class AsyncID
20
// {
21
// public:
22
// virtual operator==(const AsyncID& other) const = 0;
23
// virtual bool operator<(const AsyncID& rhs) const = 0;
24
// };
25
26
typedef
unsigned
long
AsyncID
;
27
28
//error code of zero is success. Should define an enum for implementations to
29
//map to.
30
class
AsyncResult
31
{
32
public
:
33
AsyncResult
() :
mErrorCode
(0) {}
34
AsyncResult
(
long
errorCode
) :
mErrorCode
(
errorCode
) {}
35
void
setError
(
long
errorCode
) {
mErrorCode
=
errorCode
; }
36
long
errorCode
()
const
{
return
mErrorCode
; }
37
bool
success
()
const
{
return
mErrorCode
== 0 ? true :
false
; }
38
protected
:
39
long
mErrorCode
;
40
};
41
42
}
43
44
#endif
45
46
/* ====================================================================
47
* The Vovida Software License, Version 1.0
48
*
49
* Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
50
*
51
* Redistribution and use in source and binary forms, with or without
52
* modification, are permitted provided that the following conditions
53
* are met:
54
*
55
* 1. Redistributions of source code must retain the above copyright
56
* notice, this list of conditions and the following disclaimer.
57
*
58
* 2. Redistributions in binary form must reproduce the above copyright
59
* notice, this list of conditions and the following disclaimer in
60
* the documentation and/or other materials provided with the
61
* distribution.
62
*
63
* 3. The names "VOCAL", "Vovida Open Communication Application Library",
64
* and "Vovida Open Communication Application Library (VOCAL)" must
65
* not be used to endorse or promote products derived from this
66
* software without prior written permission. For written
67
* permission, please contact vocal@vovida.org.
68
*
69
* 4. Products derived from this software may not be called "VOCAL", nor
70
* may "VOCAL" appear in their name, without prior written
71
* permission of Vovida Networks, Inc.
72
*
73
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
74
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
75
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
76
* NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
77
* NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
78
* IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
79
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
80
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
81
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
82
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
83
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
84
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
85
* DAMAGE.
86
*
87
* ====================================================================
88
*
89
* This software consists of voluntary contributions made by Vovida
90
* Networks, Inc. and many individuals on behalf of Vovida Networks,
91
* Inc. For more information on Vovida Networks, Inc., please see
92
* <http://www.vovida.org/>.
93
*
94
*/
resip::AsyncResult
Definition
AsyncID.hxx:31
resip::AsyncResult::errorCode
long errorCode() const
Definition
AsyncID.hxx:36
resip::AsyncResult::mErrorCode
long mErrorCode
Definition
AsyncID.hxx:39
resip::AsyncResult::AsyncResult
AsyncResult()
Definition
AsyncID.hxx:33
resip::AsyncResult::setError
void setError(long errorCode)
Definition
AsyncID.hxx:35
resip::AsyncResult::AsyncResult
AsyncResult(long errorCode)
Definition
AsyncID.hxx:34
resip::AsyncResult::success
bool success() const
Definition
AsyncID.hxx:37
resip
dcm! – add UnusedChecking(_enum) below;
Definition
AbstractFifo.hxx:16
resip::AsyncID
unsigned long AsyncID
Definition
AsyncID.hxx:26
rutil
AsyncID.hxx
Generated by
1.9.8