• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2012 Google Inc. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef POLO_PAIRING_MESSAGE_PAIRINGREQUESTACKMESSAGE_H_
16 #define POLO_PAIRING_MESSAGE_PAIRINGREQUESTACKMESSAGE_H_
17 
18 #include <string>
19 #include "polo/pairing/message/polomessage.h"
20 
21 namespace polo {
22 namespace pairing {
23 namespace message {
24 
25 // Ack for a pairing request message.
26 class PairingRequestAckMessage : public PoloMessage {
27  public:
28   // Creates a new pairing request ack with no server name.
29   PairingRequestAckMessage();
30 
31   // Creates a new pairing request ack with the given server name.
32   // @param server_name the server name
33   explicit PairingRequestAckMessage(const std::string& server_name);
34 
35   // Gets the server name.
36   std::string server_name() const;
37 
38   // Gets whether there is a server name.
39   bool has_server_name() const;
40 
41   // @override
42   virtual std::string ToString() const;
43  private:
44   std::string server_name_;
45 
46   DISALLOW_COPY_AND_ASSIGN(PairingRequestAckMessage);
47 };
48 
49 }  // namespace message
50 }  // namespace pairing
51 }  // namespace polo
52 
53 #endif  // POLO_PAIRING_MESSAGE_PAIRINGREQUESTACKMESSAGE_H_
54