summaryrefslogtreecommitdiff
path: root/cpp/src/polo/pairing/message/pairingrequestackmessage.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/polo/pairing/message/pairingrequestackmessage.cc')
-rw-r--r--cpp/src/polo/pairing/message/pairingrequestackmessage.cc50
1 files changed, 50 insertions, 0 deletions
diff --git a/cpp/src/polo/pairing/message/pairingrequestackmessage.cc b/cpp/src/polo/pairing/message/pairingrequestackmessage.cc
new file mode 100644
index 0000000..1d4f649
--- /dev/null
+++ b/cpp/src/polo/pairing/message/pairingrequestackmessage.cc
@@ -0,0 +1,50 @@
+// Copyright 2012 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "polo/pairing/message/pairingrequestackmessage.h"
+
+#include <sstream>
+
+namespace polo {
+namespace pairing {
+namespace message {
+
+PairingRequestAckMessage::PairingRequestAckMessage()
+ : PoloMessage(PoloMessage::kPairingRequestAck),
+ server_name_("") {
+}
+
+PairingRequestAckMessage::PairingRequestAckMessage(
+ const std::string& server_name)
+ : PoloMessage(PoloMessage::kPairingRequestAck),
+ server_name_(server_name) {
+}
+
+std::string PairingRequestAckMessage::server_name() const {
+ return server_name_;
+}
+
+bool PairingRequestAckMessage::has_server_name() const {
+ return server_name_.length() > 0;
+}
+
+std::string PairingRequestAckMessage::ToString() const {
+ std::ostringstream ss;
+ ss << "[PairingRequestAckMessage server_name=" << server_name_ << "]";
+ return ss.str();
+}
+
+} // namespace message
+} // namespace pairing
+} // namespace polo