Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / libjingle / source / talk / xmpp / rostermoduleimpl.cc
index 31b3abd..8841db6 100644 (file)
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <vector>
-#include <string>
-#include <map>
 #include <algorithm>
-#include <sstream>
 #include <iostream>
-#include "talk/base/common.h"
-#include "talk/base/stringencode.h"
-#include "talk/xmpp/constants.h"
-#include "talk/xmpp/rostermoduleimpl.h"
+#include <map>
+#include <sstream>
+#include <string>
+#include <vector>
+#include "webrtc/libjingle/xmpp/constants.h"
+#include "webrtc/libjingle/xmpp/rostermoduleimpl.h"
+#include "webrtc/base/common.h"
+#include "webrtc/base/stringencode.h"
 
 namespace buzz {
 
@@ -217,7 +217,7 @@ XmppPresenceImpl::priority() const {
     return 0;
 
   int raw_priority = 0;
-  if (!talk_base::FromString(raw_xml_->TextNamed(QN_PRIORITY), &raw_priority))
+  if (!rtc::FromString(raw_xml_->TextNamed(QN_PRIORITY), &raw_priority))
     raw_priority = 0;
   if (raw_priority < -128)
     raw_priority = -128;
@@ -238,7 +238,7 @@ XmppPresenceImpl::set_priority(int priority) {
   raw_xml_->ClearNamedChildren(QN_PRIORITY);
   if (0 != priority) {
     std::string priority_string;
-    if (talk_base::ToString(priority, &priority_string)) {
+    if (rtc::ToString(priority, &priority_string)) {
       raw_xml_->AddElement(new XmlElement(QN_PRIORITY));
       raw_xml_->AddText(priority_string, 1);
     }
@@ -351,10 +351,6 @@ XmppPresenceImpl::set_raw_xml(const XmlElement * xml) {
       xml->Name() != QN_PRESENCE)
     return XMPP_RETURN_BADARGUMENT;
 
-  const std::string& type = xml->Attr(QN_TYPE);
-  if (type != STR_EMPTY && type != "unavailable")
-    return XMPP_RETURN_BADARGUMENT;
-
   raw_xml_.reset(new XmlElement(*xml));
   return XMPP_RETURN_OK;
 }