13#define RESIPROCATE_SUBSYSTEM Subsystem::REPRO
34 pb.
data(path, anchor);
42 catch(resip::ParseBuffer::Exception& e)
45 ErrLog(<<
"Failed to load a static registration due to parse error: " << e);
67 Key addKey = buildKey(aorData, contactData);
71 NameAddrs::const_iterator it = path.
begin();
72 for(; it != path.
end(); it++)
74 if(it != path.
begin())
81 InfoLog( <<
"Add StaticReg: key=" << addKey);
91 std::pair<Uri, Uri> mapKey = make_pair(aor, contact.
uri());
92 StaticRegRecordMap::iterator it = mStaticRegList.find(mapKey);
93 if(it != mStaticRegList.end())
99 it->second.mAor = aor;
100 it->second.mContact = contact;
101 it->second.mPath = path;
110 if(!removeKey.
empty())
127 StaticRegRecordMap::iterator it = mStaticRegList.find(make_pair(aor, contact.
uri()));
128 if(it != mStaticRegList.end())
134 mStaticRegList.erase(it);
138 if(!removeKey.
empty())
150 Data pKey = aor+
":"+contact;
virtual Key nextStaticRegKey()
virtual void eraseStaticReg(const Key &key)
virtual Key firstStaticRegKey()
virtual bool addStaticReg(const Key &key, const StaticRegRecord &rec)
virtual StaticRegRecord getStaticReg(const Key &key) const
bool addStaticReg(const resip::Uri &aor, const resip::NameAddr &contact, const resip::NameAddrs &path)
StaticRegStore(AbstractDb &db)
void eraseStaticReg(const resip::Uri &aor, const resip::NameAddr &contact)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
bool empty() const noexcept
Checks whether the Data is empty.
static Data from(const T &x)
Converts from arbitrary other type to Data.
Represents the "name-addr" and the "addr-spec" elements in the RFC 3261 grammar.
Provides string-parsing functionality with protection from buffer overflow.
CurrentPosition skipToChar(char c)
CurrentPosition position() const
CurrentPosition skipChar()
void data(Data &data, const char *start) const
make the passed in data share memory with the buffer (uses Data::Share)
iterator end()
Returns an iterator pointing to the last header field value.
iterator begin()
Returns an iterator pointing to the first header field value.
void push_back(const T &t)
Inserts a header field value at the back of this container.
static const char * COMMA
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
This Class is used to implement a primitive form of RPC using loose XML formatting.
dcm! – add UnusedChecking(_enum) below;