Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / remoting / signaling / jid_util.h
blob7660ae38b1ac5d1c67db5acbec2ab7abd61dd61c
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef REMOTING_SIGNALING_JID_UTIL_H_
6 #define REMOTING_SIGNALING_JID_UTIL_H_
8 #include <string>
10 namespace remoting {
12 // Normalizes the |jid| by converting case-insensitive parts (node and domain)
13 // to lower-case.
14 std::string NormalizeJid(const std::string& jid);
16 // Splits a JID into a bare JID and a resource suffix. Either or both
17 // of |full_jid| and |resource| may be null. If |full_jid| is already
18 // a bare JID, |resource| is set to the empty string. Returns true of
19 // |full_jid| has a resource, false if not.
21 // e.g. "user@domain/resource" -> "user@domain", "resource", true
22 // "user@domain" -> "user@domain", "", false
23 bool SplitJidResource(const std::string& full_jid,
24 std::string* bare_jid,
25 std::string* resource);
27 } // namespace remoting
29 #endif // REMOTING_SIGNALING_JID_UTIL_H_