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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9806 - (show annotations) (download)
Thu Aug 2 16:34:53 2012 UTC (7 years, 3 months ago) by sgodin
File MIME type: text/plain
File size: 3772 byte(s)
-some build fixes submitted by Xmly

ContactInstanceRecord.hxx
Use ULL suffix instead of UL. change ContactInstanceRecord.hxx:15, 
     static const UInt64 NeverExpire = 0xFFFFFFFFFFFFFFFFUL; ->
     static const UInt64 NeverExpire = 0xFFFFFFFFFFFFFFFFULL;
   
      Reference links,
      http://gcc.gnu.org/onlinedocs/gcc/Long-Long.html


StackThread.hxx
This error happens when compiling StackThread.cxx.  gcc 3.2.2 is used.
In file included from StackThread.cxx:1:
../../resip/stack/StackThread.hxx:28: parse error before `&' token
StackThread.cxx:11: prototype for `
   resip::StackThread::StackThread(resip::SipStack&)' does not match any in 
   class `! resip::StackThread'
Fix
     Using RESIP_DEPRECATED before constructor StackThread(SipStack& stack)  gives the compiler a surprise.   
    Though there is no such compiling error with latest gcc, suggest fix it for backward compatibility. In stack/StackThread.hxx, change line
     RESIP_DEPRECATED StackThread(SipStack& stack) ->
     StackThread(SipStack& stack) RESIP_DEPRECATED

1 #if !defined(resip_ContactInstanceRecord_hxx)
2 #define resip_ContactInstanceRecord_hxx
3
4 #include <vector>
5 #include <list>
6 #include <deque>
7
8 #include "resip/stack/NameAddr.hxx"
9 #include "rutil/Data.hxx"
10 #include "resip/stack/Tuple.hxx"
11 #include "rutil/SharedPtr.hxx"
12
13 namespace resip
14 {
15 static const UInt64 NeverExpire = 0xFFFFFFFFFFFFFFFFULL;
16
17 /** A single contact record, bound to an Aor during registration.
18 */
19 class ContactInstanceRecord
20 {
21 public:
22 ContactInstanceRecord();
23 static ContactInstanceRecord makeRemoveDelta(const NameAddr& contact);
24 static ContactInstanceRecord makeUpdateDelta(const NameAddr& contact,
25 UInt64 expires, // absolute time in secs
26 const SipMessage& msg);
27
28 NameAddr mContact; // can contain callee caps and q-values
29 UInt64 mRegExpires; // in seconds
30 UInt64 mLastUpdated; // in seconds
31 Tuple mReceivedFrom; // source transport, IP address, and port
32 Tuple mPublicAddress; // Public IP address closest to the client (from Via headers): note: Tuple::getType == UNKNOWN_TRANPORT if no public address was found
33 NameAddrs mSipPath; // Value of SIP Path header from the request
34 Data mInstance; // From the instance parameter; usually a UUID URI
35 UInt32 mRegId; // From regid parameter of Contact header
36 bool mSyncContact; // This contact came from registration sync process, instead of direct SIP registration
37 bool mUseFlowRouting; // Set to true when routing to this contact should use flow routing
38 // Note: There is no need to regsync this field, since such records will also have
39 // onlyUseExistingConnection set, and such contacts are not replicated.
40 // Data mServerSessionId;// if there is no SIP Path header, the connection/session identifier
41 // Uri gruu; (GRUU is currently derived)
42 void *mUserInfo; //!< can be used to map user record information (database record id for faster updates?)
43
44 bool operator==(const ContactInstanceRecord& rhs) const;
45 };
46
47 typedef std::list<ContactInstanceRecord> ContactList;
48
49 /** Used to reduce copying ContactInstanceRecord objects when processing registration.
50 */
51 typedef std::list<resip::SharedPtr<ContactInstanceRecord> > ContactPtrList;
52
53 /** Records a log of the database transacations that were performed when processing a local registration using the
54 ServerRegistration::AsyncLocalStore.
55 */
56 class ContactRecordTransaction
57 {
58 public:
59
60 typedef enum Operation
61 {
62 none,
63 update,
64 create,
65 remove,
66 removeAll
67 } Operation;
68
69 ContactRecordTransaction()
70 :mOp(none)
71 {}
72
73 ContactRecordTransaction(Operation op, resip::SharedPtr<ContactInstanceRecord> rec)
74 :mOp(op),mRec(rec)
75 {}
76
77 Operation mOp; //!< the operation that was performed in this transaction.
78 /** For create & update: the newly modified record; for remove: the removed record; for removeAll: 0.
79 */
80 resip::SharedPtr<ContactInstanceRecord> mRec;
81 };
82
83 /** Contains a collection of database operations that were performed during REGISTER processing.
84 */
85 typedef std::deque<resip::SharedPtr<ContactRecordTransaction> > ContactRecordTransactionLog;
86
87 class RegistrationBinding
88 {
89 public:
90 Data mAor; // canonical URI for this AOR and its aliases
91 ContactList mContacts;
92 std::vector<Uri> mAliases;
93 };
94
95 struct RegistrationBindingDelta
96 {
97 Data mAor;
98 std::vector<ContactInstanceRecord> mInserts;
99 std::vector<ContactInstanceRecord> mUpdates;
100 std::vector<ContactInstanceRecord> mRemoves;
101 };
102 }
103 #endif

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