Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/development'
Browse files Browse the repository at this point in the history
  • Loading branch information
f1xpl committed Apr 1, 2018
2 parents 3db2770 + 839fd0f commit b2af461
Show file tree
Hide file tree
Showing 38 changed files with 1,851 additions and 241 deletions.
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ C++ object-oriented library containing implementation of core AndroidAuto(tm) fu
### Supported functionalities
- AOAP (Android Open Accessory Protocol)
- USB transport
- TCP transport
- USB hotplug
- AndroidAuto(tm) protocol
- SSL encryption
Expand Down
2 changes: 2 additions & 0 deletions include/f1x/aasdk/Common/Data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ struct DataBuffer
DataBuffer(void* _data, Data::size_type _size, Data::size_type offset = 0);
explicit DataBuffer(Data& _data, Data::size_type offset = 0);
bool operator==(const std::nullptr_t&) const;
bool operator==(const DataBuffer& buffer) const;

Data::value_type* data;
Data::size_type size;
Expand All @@ -54,6 +55,7 @@ struct DataConstBuffer
DataConstBuffer(const void* _data, Data::size_type _size, Data::size_type offset = 0);
explicit DataConstBuffer(const Data& _data, Data::size_type offset = 0);
bool operator==(const std::nullptr_t&) const;
bool operator==(const DataConstBuffer& buffer) const;

const Data::value_type* cdata;
Data::size_type size;
Expand Down
2 changes: 2 additions & 0 deletions include/f1x/aasdk/Error/Error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class Error: public std::exception

bool operator!() const;
bool operator==(const Error& other) const;
bool operator==(const ErrorCode& code) const;
bool operator!=(const ErrorCode& code) const;

private:
ErrorCode code_;
Expand Down
68 changes: 34 additions & 34 deletions include/f1x/aasdk/Error/ErrorCode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,40 +29,40 @@ namespace error

enum class ErrorCode
{
NONE,
USB_CLAIM_INTERFACE,
USB_INVALID_CONFIG_DESCRIPTOR,
USB_OBTAIN_INTERFACE_DESCRIPTOR,
USB_EMPTY_INTERFACES,
USB_INVALID_DEVICE_ENDPOINTS,
USB_INVALID_TRANSFER_METHOD,
USB_TRANSFER_ALLOCATION,
USB_LIST_DEVICES,
USB_OBTAIN_CONFIG_DESCRIPTOR,
USB_TRANSFER,
USB_SINK_COMMIT_OVERFLOW,
USB_SINK_CONSUME_UNDERFLOW,
USB_AOAP_PROTOCOL_VERSION,
USB_EMPTY_DEVICE_LIST,
USB_AOAP_DEVICE_NOT_FOUND,
SSL_READ_CERTIFICATE,
SSL_READ_PRIVATE_KEY,
SSL_METHOD,
SSL_CONTEXT_CREATION,
SSL_USE_CERTIFICATE,
SSL_USE_PRIVATE_KEY,
SSL_HANDLER_CREATION,
SSL_READ_BIO_CREATION,
SSL_WRITE_BIO_CREATION,
SSL_HANDSHAKE,
SSL_WRITE,
SSL_READ,
SSL_BIO_READ,
SSL_BIO_WRITE,
MESSENGER_INTERTWINED_CHANNELS,
OPERATION_ABORTED,
OPERATION_IN_PROGRESS,
PARSE_PAYLOAD
NONE = 0,
USB_CLAIM_INTERFACE = 1,
USB_INVALID_CONFIG_DESCRIPTOR = 2,
USB_OBTAIN_INTERFACE_DESCRIPTOR = 3,
USB_EMPTY_INTERFACES = 4,
USB_INVALID_DEVICE_ENDPOINTS = 5,
USB_INVALID_TRANSFER_METHOD = 6,
USB_TRANSFER_ALLOCATION = 7,
USB_LIST_DEVICES = 8,
USB_OBTAIN_CONFIG_DESCRIPTOR = 9,
USB_TRANSFER = 10,
DATA_SINK_COMMIT_OVERFLOW = 11,
DATA_SINK_CONSUME_UNDERFLOW = 12,
USB_AOAP_PROTOCOL_VERSION = 13,
USB_AOAP_DEVICE_NOT_FOUND = 14,
SSL_READ_CERTIFICATE = 15,
SSL_READ_PRIVATE_KEY = 16,
SSL_METHOD = 17,
SSL_CONTEXT_CREATION = 18,
SSL_USE_CERTIFICATE = 19,
SSL_USE_PRIVATE_KEY = 20,
SSL_HANDLER_CREATION = 21,
SSL_READ_BIO_CREATION = 22,
SSL_WRITE_BIO_CREATION = 23,
SSL_HANDSHAKE = 24,
SSL_WRITE = 25,
SSL_READ = 26,
SSL_BIO_READ = 27,
SSL_BIO_WRITE = 28,
MESSENGER_INTERTWINED_CHANNELS = 29,
OPERATION_ABORTED = 30,
OPERATION_IN_PROGRESS = 31,
PARSE_PAYLOAD = 32,
TCP_TRANSFER = 33
};

}
Expand Down
4 changes: 1 addition & 3 deletions include/f1x/aasdk/IO/IOContextWrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ namespace aasdk
namespace io
{

class IOContextWrapper: boost::noncopyable
class IOContextWrapper
{
public:
typedef std::shared_ptr<IOContextWrapper> Pointer;

IOContextWrapper();
explicit IOContextWrapper(boost::asio::io_service& ioService);
explicit IOContextWrapper(boost::asio::io_service::strand& strand);
Expand Down

0 comments on commit b2af461

Please sign in to comment.