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

Side by Side Diff: components/copresence_endpoints/copresence_socket.h

Issue 895783002: Remove the Copresence Endpoints API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
(Empty)
1 // Copyright 2014 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 COMPONENTS_COPRESENCE_ENDPOINTS_COPRESENCE_SOCKET_H_
6 #define COMPONENTS_COPRESENCE_ENDPOINTS_COPRESENCE_SOCKET_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11
12 namespace net {
13 class IOBuffer;
14 }
15
16 namespace copresence_endpoints {
17
18 // A CopresenceSocket is an object that is used to send receive data to and
19 // from CopresencePeers.
20 // TODO(rkc): Add the ability to connect to a remote CopresencePeer.
21 class CopresenceSocket {
22 public:
23 typedef base::Callback<void(const scoped_refptr<net::IOBuffer>& buffer,
24 int buffer_size)> ReceiveCallback;
25
26 CopresenceSocket() {}
27 virtual ~CopresenceSocket() {}
28
29 // Send data on this socket. If unable to send the data, return false. This
30 // operation only guarantees that if the return value is a success, the send
31 // was started. It does not make any guarantees about the completion of the
32 // operation.
33 // TODO(rkc): Expand the bool into more a more detailed failures enum.
34 virtual bool Send(const scoped_refptr<net::IOBuffer>& buffer,
35 int buffer_size) = 0;
36 virtual void Receive(const ReceiveCallback& callback) = 0;
37
38 private:
39 DISALLOW_COPY_AND_ASSIGN(CopresenceSocket);
40 };
41
42 } // namespace copresence_endpoints
43
44 #endif // COMPONENTS_COPRESENCE_ENDPOINTS_COPRESENCE_SOCKET_H_
OLDNEW
« no previous file with comments | « components/copresence_endpoints/copresence_endpoint.cc ('k') | components/copresence_endpoints/public/copresence_endpoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698