aboutsummaryrefslogtreecommitdiff
path: root/osp/impl/service_publisher_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'osp/impl/service_publisher_impl.h')
-rw-r--r--osp/impl/service_publisher_impl.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/osp/impl/service_publisher_impl.h b/osp/impl/service_publisher_impl.h
index 1817ab1f..fa2c3890 100644
--- a/osp/impl/service_publisher_impl.h
+++ b/osp/impl/service_publisher_impl.h
@@ -5,6 +5,8 @@
#ifndef OSP_IMPL_SERVICE_PUBLISHER_IMPL_H_
#define OSP_IMPL_SERVICE_PUBLISHER_IMPL_H_
+#include <memory>
+
#include "osp/impl/with_destruction_callback.h"
#include "osp/public/service_publisher.h"
#include "platform/base/macros.h"
@@ -22,11 +24,12 @@ class ServicePublisherImpl final : public ServicePublisher,
void SetPublisherImpl(ServicePublisherImpl* publisher);
- virtual void StartPublisher() = 0;
- virtual void StartAndSuspendPublisher() = 0;
+ virtual void StartPublisher(const ServicePublisher::Config& config) = 0;
+ virtual void StartAndSuspendPublisher(
+ const ServicePublisher::Config& config) = 0;
virtual void StopPublisher() = 0;
virtual void SuspendPublisher() = 0;
- virtual void ResumePublisher() = 0;
+ virtual void ResumePublisher(const ServicePublisher::Config& config) = 0;
protected:
void SetState(State state) { publisher_->SetState(state); }
@@ -37,7 +40,7 @@ class ServicePublisherImpl final : public ServicePublisher,
// |observer| is optional. If it is provided, it will receive appropriate
// notifications about this ServicePublisher. |delegate| is required and
// is used to implement state transitions.
- ServicePublisherImpl(Observer* observer, Delegate* delegate);
+ ServicePublisherImpl(Observer* observer, std::unique_ptr<Delegate> delegate);
~ServicePublisherImpl() override;
// ServicePublisher overrides.
@@ -56,7 +59,7 @@ class ServicePublisherImpl final : public ServicePublisher,
// by the observer interface.
void MaybeNotifyObserver();
- Delegate* const delegate_;
+ std::unique_ptr<Delegate> delegate_;
OSP_DISALLOW_COPY_AND_ASSIGN(ServicePublisherImpl);
};