Skip to content

Commit

Permalink
using instead of typedef
Browse files Browse the repository at this point in the history
  • Loading branch information
silverchris committed Aug 13, 2022
1 parent d5990f2 commit 116b22b
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion include/autoapp/App.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace autoapp {

class App : public service::IAndroidAutoEntityEventHandler, public std::enable_shared_from_this<App> {
public:
typedef std::shared_ptr<App> Pointer;
using Pointer = std::shared_ptr<App>;

App(asio::io_service &ioService,
aasdk::usb::USBWrapper &usbWrapper,
Expand Down
2 changes: 1 addition & 1 deletion include/autoapp/Configuration/IConfiguration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace autoapp::configuration {

class IConfiguration {
public:
typedef std::shared_ptr<IConfiguration> Pointer;
using Pointer = std::shared_ptr<IConfiguration>;

virtual ~IConfiguration() = default;

Expand Down
4 changes: 2 additions & 2 deletions include/autoapp/Projection/AlsaAudioInput.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class AlsaAudioInput : public IAudioInput {
std::string micDevice;

public:
typedef aasdk::io::Promise<void, void> StartPromise;
typedef aasdk::io::Promise<aasdk::common::Data, void> ReadPromise;
using StartPromise = aasdk::io::Promise<void, void>;
using ReadPromise = aasdk::io::Promise<aasdk::common::Data, void>;

explicit AlsaAudioInput(asio::io_service &ioService, std::string micDevice = "default");

Expand Down
6 changes: 3 additions & 3 deletions include/autoapp/Projection/IAudioInput.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ namespace autoapp::projection {

class IAudioInput {
public:
typedef aasdk::io::Promise<void, void> StartPromise;
typedef aasdk::io::Promise<aasdk::common::Data, void> ReadPromise;
typedef std::shared_ptr<IAudioInput> Pointer;
using StartPromise = aasdk::io::Promise<void, void>;
using ReadPromise = aasdk::io::Promise<aasdk::common::Data, void>;
using Pointer = std::shared_ptr<IAudioInput>;

virtual ~IAudioInput() = default;

Expand Down
2 changes: 1 addition & 1 deletion include/autoapp/Projection/IAudioOutput.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace autoapp::projection {

class IAudioOutput {
public:
typedef std::shared_ptr<IAudioOutput> Pointer;
using Pointer = std::shared_ptr<IAudioOutput>;

IAudioOutput() = default;
virtual ~IAudioOutput() = default;
Expand Down
4 changes: 2 additions & 2 deletions include/autoapp/Projection/IBluetoothDevice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ namespace autoapp::projection {

class IBluetoothDevice {
public:
typedef aasdk::io::Promise<void, void> PairingPromise;
typedef std::shared_ptr<IBluetoothDevice> Pointer;
using PairingPromise = aasdk::io::Promise<void, void>;
using Pointer = std::shared_ptr<IBluetoothDevice>;

virtual void stop() = 0;
[[nodiscard]] virtual bool isPaired(const std::string &address) const = 0;
Expand Down
4 changes: 2 additions & 2 deletions include/autoapp/Projection/IInputDevice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class IInputDeviceEventHandler;

class IInputDevice {
public:
typedef std::shared_ptr<IInputDevice> Pointer;
typedef std::vector<aasdk::proto::enums::ButtonCode::Enum> ButtonCodes;
using Pointer = std::shared_ptr<IInputDevice>;
using ButtonCodes = std::vector<aasdk::proto::enums::ButtonCode::Enum>;

virtual ~IInputDevice() = default;
virtual void start(IInputDeviceEventHandler &eventHandler) = 0;
Expand Down
2 changes: 1 addition & 1 deletion include/autoapp/Projection/IVideoOutput.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class VideoMargins {

class IVideoOutput {
public:
typedef std::shared_ptr<IVideoOutput> Pointer;
using Pointer = std::shared_ptr<IVideoOutput>;

IVideoOutput() = default;

Expand Down
2 changes: 1 addition & 1 deletion include/autoapp/Projection/MazdaBluetooth.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
namespace autoapp::projection {
class MazdaBluetooth : public IBluetoothDevice {
public:
typedef aasdk::io::Promise<void, void> PairingPromise;
using PairingPromise = aasdk::io::Promise<void, void>;

void stop() override;

Expand Down
2 changes: 1 addition & 1 deletion include/autoapp/Service/AudioInputService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class AudioInputService
public IService,
public std::enable_shared_from_this<AudioInputService> {
public:
typedef std::shared_ptr<AudioInputService> Pointer;
using Pointer = std::shared_ptr<AudioInputService>;

AudioInputService(asio::io_service &ioService,
aasdk::messenger::IMessenger::Pointer messenger,
Expand Down
2 changes: 1 addition & 1 deletion include/autoapp/Service/IAndroidAutoEntity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace autoapp::service {

class IAndroidAutoEntity {
public:
typedef std::shared_ptr<IAndroidAutoEntity> Pointer;
using Pointer = std::shared_ptr<IAndroidAutoEntity>;

virtual ~IAndroidAutoEntity() = default;

Expand Down
4 changes: 2 additions & 2 deletions include/autoapp/Service/IPinger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ namespace autoapp::service {

class IPinger {
public:
typedef std::shared_ptr<IPinger> Pointer;
typedef aasdk::io::Promise<void> Promise;
using Pointer = std::shared_ptr<IPinger>;
using Promise = aasdk::io::Promise<void>;

virtual ~IPinger() = default;
virtual void ping(Promise::Pointer promise) = 0;
Expand Down
4 changes: 2 additions & 2 deletions include/autoapp/Service/IService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace autoapp::service {

class IService {
public:
typedef std::shared_ptr<IService> Pointer;
using Pointer = std::shared_ptr<IService>;

virtual ~IService() = default;

Expand All @@ -37,6 +37,6 @@ class IService {
virtual void fillFeatures(aasdk::proto::messages::ServiceDiscoveryResponse &response) = 0;
};

typedef std::vector<IService::Pointer> ServiceList;
using ServiceList = std::vector<IService::Pointer>;

}
2 changes: 1 addition & 1 deletion include/autoapp/Service/VideoService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class VideoService
public IService,
public std::enable_shared_from_this<VideoService> {
public:
typedef std::shared_ptr<VideoService> Pointer;
using Pointer = std::shared_ptr<VideoService>;

VideoService(asio::io_service &ioService,
aasdk::messenger::IMessenger::Pointer messenger,
Expand Down
2 changes: 1 addition & 1 deletion include/autoapp/Service/WifiService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace autoapp::service {

class WifiService : public IService, public std::enable_shared_from_this<WifiService> {
public:
typedef std::shared_ptr<WifiService> Pointer;
using Pointer = std::shared_ptr<WifiService>;

WifiService(configuration::IConfiguration::Pointer configuration);

Expand Down

0 comments on commit 116b22b

Please sign in to comment.