Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ppapi / shared_impl / socket_option_data.h
blob2c8845482c2e648f513366d6eb32315a695b5638
1 // Copyright 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.
5 #ifndef PPAPI_SHARED_IMPL_SOCKET_OPTION_DATA_H_
6 #define PPAPI_SHARED_IMPL_SOCKET_OPTION_DATA_H_
8 #include "ppapi/c/pp_stdint.h"
9 #include "ppapi/shared_impl/ppapi_shared_export.h"
11 namespace ppapi {
13 class PPAPI_SHARED_EXPORT SocketOptionData {
14 public:
15 enum Type { TYPE_INVALID = 0, TYPE_BOOL = 1, TYPE_INT32 = 2 };
17 SocketOptionData();
18 ~SocketOptionData();
20 Type GetType() const;
22 bool GetBool(bool* out_value) const;
23 bool GetInt32(int32_t* out_value) const;
25 void SetBool(bool value);
26 void SetInt32(int32_t value);
28 private:
29 Type type_;
30 int32_t value_;
33 } // namespace ppapi
35 #endif // PPAPI_SHARED_IMPL_SOCKET_OPTION_DATA_H_