blob: cd2502975b211fc6182ba21b2deae4557613e75a [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SRC_DEVELOPER_FEEDBACK_FEEDBACK_DATA_ANNOTATIONS_ANNOTATION_PROVIDER_FACTORY_H_
#define SRC_DEVELOPER_FEEDBACK_FEEDBACK_DATA_ANNOTATIONS_ANNOTATION_PROVIDER_FACTORY_H_
#include <lib/async/dispatcher.h>
#include <lib/sys/cpp/service_directory.h>
#include <zircon/time.h>
#include <vector>
#include "src/developer/feedback/feedback_data/annotations/annotation_provider.h"
#include "src/developer/feedback/utils/cobalt/logger.h"
namespace feedback {
// Get the annotations providers that can be used safely to collect annotations multiple times,
// this includes providers that are caching asynchronous static annotations as well as providers
// offering dynamic annotations that don't require connecting to a service.
std::vector<std::unique_ptr<AnnotationProvider>> GetReusableProviders(
async_dispatcher_t* dispatcher, std::shared_ptr<sys::ServiceDirectory> services,
cobalt::Logger* cobalt);
// Get the annotations providers that can only be used once to collect annotations, typically
// providers that have a one-shot connection to a service.
std::vector<std::unique_ptr<AnnotationProvider>> GetSingleUseProviders(
async_dispatcher_t* dispatcher, std::shared_ptr<sys::ServiceDirectory> services,
cobalt::Logger* cobalt);
} // namespace feedback
#endif // SRC_DEVELOPER_FEEDBACK_FEEDBACK_DATA_ANNOTATIONS_ANNOTATION_PROVIDER_FACTORY_H_