| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRLAPI_CONNECTION_
H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRLAPI_CONNECTION_
H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRLAPI_CONNECTION_
H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRLAPI_CONNECTION_
H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 virtual ~BrlapiConnection(); | 31 virtual ~BrlapiConnection(); |
| 32 | 32 |
| 33 virtual ConnectResult Connect(const OnDataReadyCallback& onDataReady) = 0; | 33 virtual ConnectResult Connect(const OnDataReadyCallback& onDataReady) = 0; |
| 34 | 34 |
| 35 virtual void Disconnect() = 0; | 35 virtual void Disconnect() = 0; |
| 36 | 36 |
| 37 virtual bool Connected() = 0; | 37 virtual bool Connected() = 0; |
| 38 | 38 |
| 39 // Gets the last brlapi error on this thread. | 39 // Gets the last brlapi error on this thread. |
| 40 // This works ismilar to errno in C. There's one thread-local error | 40 // This works similar to errno in C. There's one thread-local error |
| 41 // value, meaning that this method should be called after any | 41 // value, meaning that this method should be called after any |
| 42 // other method of this class that can return an error without calling | 42 // other method of this class that can return an error without calling |
| 43 // another method in between. This class is not thread safe. | 43 // another method in between. This class is not thread safe. |
| 44 virtual brlapi_error_t* BrlapiError() = 0; | 44 virtual brlapi_error_t* BrlapiError() = 0; |
| 45 | 45 |
| 46 // Gets a description of the last brlapi error for this thread, useful | 46 // Gets a description of the last brlapi error for this thread, useful |
| 47 // for logging. | 47 // for logging. |
| 48 virtual std::string BrlapiStrError() = 0; | 48 virtual std::string BrlapiStrError() = 0; |
| 49 | 49 |
| 50 // Gets the total size of the display, which may be 0 if no display is | 50 // Gets the total size of the display, which may be 0 if no display is |
| (...skipping 14 matching lines...) Expand all Loading... |
| 65 protected: | 65 protected: |
| 66 BrlapiConnection(); | 66 BrlapiConnection(); |
| 67 DISALLOW_COPY_AND_ASSIGN(BrlapiConnection); | 67 DISALLOW_COPY_AND_ASSIGN(BrlapiConnection); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace braille_display_private | 70 } // namespace braille_display_private |
| 71 } // namespace api | 71 } // namespace api |
| 72 } // namespace extensions | 72 } // namespace extensions |
| 73 | 73 |
| 74 #endif // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRLAPI_CONNECTI
ON_H_ | 74 #endif // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_BRLAPI_CONNECTI
ON_H_ |
| OLD | NEW |