OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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. |
| 4 |
| 5 #ifndef PPAPI_SHARED_IMPL_SOCKET_OPTION_DATA_H_ |
| 6 #define PPAPI_SHARED_IMPL_SOCKET_OPTION_DATA_H_ |
| 7 |
| 8 #include "ppapi/c/pp_stdint.h" |
| 9 #include "ppapi/shared_impl/ppapi_shared_export.h" |
| 10 |
| 11 namespace ppapi { |
| 12 |
| 13 class PPAPI_SHARED_EXPORT SocketOptionData { |
| 14 public: |
| 15 enum Type { |
| 16 TYPE_INVALID = 0, |
| 17 TYPE_BOOL = 1, |
| 18 TYPE_INT32 = 2 |
| 19 }; |
| 20 |
| 21 SocketOptionData(); |
| 22 ~SocketOptionData(); |
| 23 |
| 24 Type GetType() const; |
| 25 |
| 26 bool GetBool(bool* out_value) const; |
| 27 bool GetInt32(int32_t* out_value) const; |
| 28 |
| 29 void SetBool(bool value); |
| 30 void SetInt32(int32_t value); |
| 31 |
| 32 private: |
| 33 Type type_; |
| 34 int32_t value_; |
| 35 }; |
| 36 |
| 37 } // namespace ppapi |
| 38 |
| 39 #endif // PPAPI_SHARED_IMPL_SOCKET_OPTION_DATA_H_ |
OLD | NEW |