Added keep roster parameter to server info class. Fixed some comments
git-svn-id: http://voip.null.ro/svn/yate@1256 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
6ab69bab5f
commit
428e20ec23
|
@ -107,7 +107,7 @@ public:
|
|||
* Constructs an XML element with a TiXmlElement element with the given name.
|
||||
* Used for outgoing elements.
|
||||
* @param name The element's name.
|
||||
* @param atributes Optional list of attributes.
|
||||
* @param attributes Optional list of attributes.
|
||||
* @param text Optional text for the XML element.
|
||||
*/
|
||||
XMLElement(const char* name, NamedList* attributes = 0, const char* text = 0);
|
||||
|
@ -116,8 +116,8 @@ public:
|
|||
* Constructor.
|
||||
* Constructs an XML element with a TiXmlElement element with the given type's name.
|
||||
* Used for outgoing elements.
|
||||
* @param tyte The element's type.
|
||||
* @param atributes Optional list of attributes.
|
||||
* @param type The element's type.
|
||||
* @param attributes Optional list of attributes.
|
||||
* @param text Optional text for the XML element.
|
||||
*/
|
||||
XMLElement(Type type, NamedList* attributes = 0, const char* text = 0);
|
||||
|
|
|
@ -79,6 +79,7 @@ public:
|
|||
Dtmf, // http://jabber.org/protocol/jingle/info/dtmf
|
||||
DtmfError, // http://jabber.org/protocol/jingle/info/dtmf#errors
|
||||
Command, // http://jabber.org/protocol/command
|
||||
CapVoiceV1, // http://www.google.com/xmpp/protocol/voice/v1
|
||||
Count,
|
||||
};
|
||||
|
||||
|
@ -179,7 +180,7 @@ private:
|
|||
};
|
||||
|
||||
/**
|
||||
* This class holds a Jabber ID in form 'node@domain/resource' or 'node@domain'.
|
||||
* This class holds a Jabber ID in form "node@domain/resource" or "node@domain".
|
||||
* @short A Jabber ID.
|
||||
*/
|
||||
class YJINGLE_API JabberID : public String
|
||||
|
@ -216,7 +217,7 @@ public:
|
|||
{ return m_node; }
|
||||
|
||||
/**
|
||||
* Get the bare JID (node@domain).
|
||||
* Get the bare JID: "node@domain".
|
||||
* @return The bare JID.
|
||||
*/
|
||||
inline const String& bare() const
|
||||
|
@ -254,10 +255,10 @@ public:
|
|||
|
||||
/**
|
||||
* Set the resource part of the JID.
|
||||
* @param d The new resource part of the JID.
|
||||
* @param res The new resource part of the JID.
|
||||
*/
|
||||
inline void resource(const char* r)
|
||||
{ set(m_node.c_str(),m_domain.c_str(),r); }
|
||||
inline void resource(const char* res)
|
||||
{ set(m_node.c_str(),m_domain.c_str(),res); }
|
||||
|
||||
/**
|
||||
* Set the data.
|
||||
|
@ -587,7 +588,7 @@ public:
|
|||
* @param dest The destination NamedList.
|
||||
* @param src Pointer to the string.
|
||||
* @param sep The delimiter.
|
||||
* @param indent True to add the parts as name and index as value.
|
||||
* @param nameFirst True to add the parts as name and index as value.
|
||||
* False to do the other way.
|
||||
*/
|
||||
static bool split(NamedList& dest, const char* src, const char sep,
|
||||
|
@ -598,8 +599,8 @@ public:
|
|||
* @param text The text to check.
|
||||
* @return Iq type as enumeration.
|
||||
*/
|
||||
static inline IqType iqType(const char* txt)
|
||||
{ return (IqType)lookup(txt,s_iq,IqCount); }
|
||||
static inline IqType iqType(const char* text)
|
||||
{ return (IqType)lookup(text,s_iq,IqCount); }
|
||||
|
||||
/**
|
||||
* Keep the types of 'iq' stanzas.
|
||||
|
|
|
@ -357,7 +357,7 @@ protected:
|
|||
/**
|
||||
* Constructor.
|
||||
* Constructs an outgoing stream.
|
||||
* @param connection The engine that owns this stream.
|
||||
* @param engine The engine that owns this stream.
|
||||
* @param remoteName The remote domain name.
|
||||
* @param remoteAddr The remote address to connect.
|
||||
*/
|
||||
|
@ -370,7 +370,7 @@ protected:
|
|||
* This method is thread safe.
|
||||
* @param element The XML element to send.
|
||||
* @param newState The new state if the operation succeeds.
|
||||
* @param newState Optional XML element to send before element.
|
||||
* @param before Optional XML element to send before element.
|
||||
* @return False if the write operation fails.
|
||||
*/
|
||||
bool sendStreamXML(XMLElement* element, State newState,
|
||||
|
@ -549,10 +549,10 @@ class YJINGLE_API JBServerInfo : public RefObject
|
|||
public:
|
||||
inline JBServerInfo(const char* name, const char* address, int port,
|
||||
const char* password, const char* identity, const char* fullidentity,
|
||||
bool autoRestart, u_int32_t restartCount)
|
||||
bool roster, bool autoRestart, u_int32_t restartCount)
|
||||
: m_name(name), m_address(address), m_port(port), m_password(password),
|
||||
m_identity(identity), m_fullIdentity(fullidentity), m_autoRestart(autoRestart),
|
||||
m_restartCount(restartCount)
|
||||
m_identity(identity), m_fullIdentity(fullidentity), m_roster(roster),
|
||||
m_autoRestart(autoRestart), m_restartCount(restartCount)
|
||||
{}
|
||||
virtual ~JBServerInfo() {}
|
||||
inline const String& address() const
|
||||
|
@ -567,6 +567,8 @@ public:
|
|||
{ return m_identity; }
|
||||
inline const String& fullIdentity() const
|
||||
{ return m_fullIdentity; }
|
||||
inline bool roster() const
|
||||
{ return m_roster; }
|
||||
inline bool autoRestart() const
|
||||
{ return m_autoRestart; }
|
||||
inline u_int32_t restartCount() const
|
||||
|
@ -586,6 +588,7 @@ private:
|
|||
String m_password; // Authentication data
|
||||
String m_identity; // Identity. Used for Jabber Component protocol
|
||||
String m_fullIdentity; // Full identity for this server
|
||||
bool m_roster; // Keep roster for this server
|
||||
bool m_autoRestart; // Automatically restart stream
|
||||
u_int32_t m_restartCount; // Restart counter
|
||||
};
|
||||
|
@ -708,7 +711,7 @@ public:
|
|||
|
||||
/**
|
||||
* Check if an outgoing stream exists with the same id and remote peer.
|
||||
* @param connection The calling stream.
|
||||
* @param stream The calling stream.
|
||||
* @return True if found.
|
||||
*/
|
||||
bool remoteIdExists(const JBComponentStream* stream);
|
||||
|
@ -778,6 +781,14 @@ public:
|
|||
*/
|
||||
void appendServer(JBServerInfo* server, bool open);
|
||||
|
||||
/**
|
||||
* Find server info object.
|
||||
* @param token The search string. If 0 the default server will be used.
|
||||
* @param domain True to find by domain name. False to find by address.
|
||||
* @return Referenced JBServerInfo pointer or 0.
|
||||
*/
|
||||
JBServerInfo* getServer(const char* token = 0, bool domain = true);
|
||||
|
||||
/**
|
||||
* Get the identity of the given server for a component server.
|
||||
* @param destination The destination.
|
||||
|
@ -855,14 +866,6 @@ protected:
|
|||
*/
|
||||
void removeClient(JBClient* client);
|
||||
|
||||
/**
|
||||
* Find server info object.
|
||||
* @param token The search string. If 0 the default server will be used.
|
||||
* @param domain True to find by domain name. False to find by address.
|
||||
* @return JBServerInfo pointer or 0.
|
||||
*/
|
||||
JBServerInfo* getServer(const char* token = 0, bool domain = true);
|
||||
|
||||
/**
|
||||
* Clear the server list.
|
||||
*/
|
||||
|
@ -1268,8 +1271,8 @@ public:
|
|||
* @param text The text to check.
|
||||
* @return Presence type as enumeration.
|
||||
*/
|
||||
static inline Presence presenceType(const char* txt)
|
||||
{ return (Presence)lookup(txt,s_presence,None); }
|
||||
static inline Presence presenceType(const char* text)
|
||||
{ return (Presence)lookup(text,s_presence,None); }
|
||||
|
||||
/**
|
||||
* Get the text from a presence type.
|
||||
|
@ -1288,7 +1291,7 @@ protected:
|
|||
/**
|
||||
* Check if the given jid has a valid domain. Send error if not.
|
||||
* @param event The event with element.
|
||||
* @param domain The destination jid.
|
||||
* @param jid The destination jid.
|
||||
* @return True if jid has a valid domain.
|
||||
*/
|
||||
bool checkDestination(JBEvent* event, const JabberID& jid);
|
||||
|
@ -1459,8 +1462,8 @@ public:
|
|||
* @param text The text to check.
|
||||
* @return Show type as enumeration.
|
||||
*/
|
||||
static inline Show showType(const char* txt)
|
||||
{ return (Show)lookup(txt,s_show,ShowNone); }
|
||||
static inline Show showType(const char* text)
|
||||
{ return (Show)lookup(text,s_show,ShowNone); }
|
||||
|
||||
/**
|
||||
* Get the text from a show type.
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
* Fill this object from the given attributes.
|
||||
* @param id The 'id' attribute.
|
||||
* @param name The 'name' attribute.
|
||||
* @param clocrate The 'clockrate' attribute.
|
||||
* @param clockrate The 'clockrate' attribute.
|
||||
* @param bitrate The 'bitrate' attribute.
|
||||
*/
|
||||
inline JGAudio(const char* id, const char* name, const char* clockrate,
|
||||
|
@ -112,7 +112,7 @@ public:
|
|||
* Set the data.
|
||||
* @param id The 'id' attribute.
|
||||
* @param name The 'name' attribute.
|
||||
* @param clocrate The 'clockrate' attribute.
|
||||
* @param clockrate The 'clockrate' attribute.
|
||||
* @param bitrate The 'bitrate' attribute.
|
||||
*/
|
||||
void set(const char* id, const char* name, const char* clockrate,
|
||||
|
@ -177,7 +177,7 @@ public:
|
|||
|
||||
/**
|
||||
* Create and add a 'candidate' child to the given element.
|
||||
* @param description The element.
|
||||
* @param transport The element.
|
||||
*/
|
||||
inline void addTo(XMLElement* transport)
|
||||
{ if (transport) transport->addChild(toXML()); }
|
||||
|
@ -621,7 +621,7 @@ protected:
|
|||
|
||||
/**
|
||||
* Selectively confirm an 'iq' (skip confirmation for transport-info).
|
||||
* @param element The event containing the element to confirm.
|
||||
* @param event The event containing the element to confirm.
|
||||
*/
|
||||
void confirmIqSelect(JGEvent* event);
|
||||
|
||||
|
|
Loading…
Reference in New Issue