Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Side by Side Diff: ppapi/cpp/private/udp_socket_private.h

Issue 10735056: AllowBroadcast() is exposed to NaCl. (Closed) Base URL: http://git.chromium.org/chromium/src.git@udp_broadcast
Patch Set: Sync. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_CPP_PRIVATE_UDP_SOCKET_PRIVATE_H_ 5 #ifndef PPAPI_CPP_PRIVATE_UDP_SOCKET_PRIVATE_H_
6 #define PPAPI_CPP_PRIVATE_UDP_SOCKET_PRIVATE_H_ 6 #define PPAPI_CPP_PRIVATE_UDP_SOCKET_PRIVATE_H_
7 7
8 #include "ppapi/c/pp_stdint.h" 8 #include "ppapi/c/pp_stdint.h"
9 #include "ppapi/c/private/ppb_udp_socket_private.h" 9 #include "ppapi/c/private/ppb_udp_socket_private.h"
10 #include "ppapi/cpp/resource.h" 10 #include "ppapi/cpp/resource.h"
11 #include "ppapi/cpp/var.h"
viettrungluu 2012/08/27 18:33:54 No need to actually include this here. A forward d
ygorshenin1 2012/08/27 19:12:47 Done.
11 12
12 namespace pp { 13 namespace pp {
13 14
14 class CompletionCallback; 15 class CompletionCallback;
15 class InstanceHandle; 16 class InstanceHandle;
16 17
17 class UDPSocketPrivate : public Resource { 18 class UDPSocketPrivate : public Resource {
18 public: 19 public:
19 explicit UDPSocketPrivate(const InstanceHandle& instance); 20 explicit UDPSocketPrivate(const InstanceHandle& instance);
20 21
21 // Returns true if the required interface is available. 22 // Returns true if the required interface is available.
22 static bool IsAvailable(); 23 static bool IsAvailable();
23 24
25 int32_t SetSocketFeature(PP_UDPSocketFeature_Private name, const Var& value);
24 int32_t Bind(const PP_NetAddress_Private* addr, 26 int32_t Bind(const PP_NetAddress_Private* addr,
25 const CompletionCallback& callback); 27 const CompletionCallback& callback);
26 bool GetBoundAddress(PP_NetAddress_Private* addr); 28 bool GetBoundAddress(PP_NetAddress_Private* addr);
27 int32_t RecvFrom(char* buffer, 29 int32_t RecvFrom(char* buffer,
28 int32_t num_bytes, 30 int32_t num_bytes,
29 const CompletionCallback& callback); 31 const CompletionCallback& callback);
30 bool GetRecvFromAddress(PP_NetAddress_Private* addr); 32 bool GetRecvFromAddress(PP_NetAddress_Private* addr);
31 int32_t SendTo(const char* buffer, 33 int32_t SendTo(const char* buffer,
32 int32_t num_bytes, 34 int32_t num_bytes,
33 const PP_NetAddress_Private* addr, 35 const PP_NetAddress_Private* addr,
34 const CompletionCallback& callback); 36 const CompletionCallback& callback);
35 void Close(); 37 void Close();
36 }; 38 };
37 39
38 } // namespace pp 40 } // namespace pp
39 41
40 #endif // PPAPI_CPP_PRIVATE_UDP_SOCKET_PRIVATE_H_ 42 #endif // PPAPI_CPP_PRIVATE_UDP_SOCKET_PRIVATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698