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_SECRETACKMESSAGE_H_ 16#define POLO_PAIRING_MESSAGE_SECRETACKMESSAGE_H_ 17 18#include <stdint.h> 19#include <string> 20#include <vector> 21#include "polo/pairing/message/polomessage.h" 22 23namespace polo { 24namespace pairing { 25namespace message { 26 27// Ack for a secret message. 28class SecretAckMessage : public PoloMessage { 29 public: 30 // Creates a new ack for the given secret. 31 // @param secret the secret 32 explicit SecretAckMessage(const std::vector<uint8_t>& secret); 33 34 // Gets the secret. 35 const std::vector<uint8_t>& secret() const; 36 37 // @override 38 virtual std::string ToString() const; 39 private: 40 std::vector<uint8_t> secret_; 41 42 DISALLOW_COPY_AND_ASSIGN(SecretAckMessage); 43}; 44 45} // namespace message 46} // namespace pairing 47} // namespace polo 48 49#endif // POLO_PAIRING_MESSAGE_SECRETACKMESSAGE_H_ 50