mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 15:16:12 -04:00
Signed-off-by: Alexey Polyudov <apolyudov@google.com> Change-Id: I8936b527079074d5c3af5531b9245063767cc4a7
31 lines
716 B
C++
31 lines
716 B
C++
#ifndef PLATFORM_V2_IMPL_G3_PIPE_H_
|
|
#define PLATFORM_V2_IMPL_G3_PIPE_H_
|
|
|
|
#include <memory>
|
|
|
|
#include "platform_v2/base/base_pipe.h"
|
|
#include "platform_v2/impl/g3/condition_variable.h"
|
|
#include "platform_v2/impl/g3/mutex.h"
|
|
|
|
namespace location {
|
|
namespace nearby {
|
|
namespace g3 {
|
|
|
|
class Pipe : public BasePipe {
|
|
public:
|
|
Pipe() {
|
|
auto mutex = std::make_unique<g3::Mutex>(/*check=*/true);
|
|
auto cond = std::make_unique<g3::ConditionVariable>(mutex.get());
|
|
Setup(std::move(mutex), std::move(cond));
|
|
}
|
|
~Pipe() override = default;
|
|
Pipe(Pipe &&) = delete;
|
|
Pipe& operator=(Pipe&&) = delete;
|
|
};
|
|
|
|
} // namespace g3
|
|
} // namespace nearby
|
|
} // namespace location
|
|
|
|
#endif // PLATFORM_V2_IMPL_G3_PIPE_H_
|