Luke Sorenson | 13e2827 | 2018-11-09 14:43:16 -0500 | [diff] [blame] | 1 | // Copyright 2018 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef MEDIA_PERCEPTION_RTANALYTICS_H_ |
| 6 | #define MEDIA_PERCEPTION_RTANALYTICS_H_ |
| 7 | |
| 8 | // This header needs to be buildable from both Google3 and outside, so it cannot |
| 9 | // rely on Google3 dependencies. |
| 10 | |
| 11 | #include <string> |
| 12 | #include <vector> |
| 13 | |
| 14 | namespace mri { |
| 15 | |
| 16 | // Typdefs for readability. Serialized protos are passed back and forth across |
| 17 | // the boundary between platform2 code and librtanalytics.so. |
| 18 | // Note that this alias is guaranteed to always have this type. |
| 19 | using SerializedSuccessStatus = std::vector<uint8_t>; |
| 20 | |
| 21 | enum PerceptionInterfaceType { |
| 22 | INTERFACE_TYPE_UNKNOWN, |
| 23 | }; |
| 24 | |
| 25 | class Rtanalytics { |
| 26 | public: |
| 27 | virtual ~Rtanalytics() = default; |
| 28 | |
| 29 | // Asks the library to setup a particular configuration. Success status is |
| 30 | // filled in by the library side. The return value is the current list of |
| 31 | // perception interface types that are fulfilled by the current configuration |
| 32 | // set. This function can be called multiple times to setup multiple |
| 33 | // configurations. |success_status| cannot be null. |
| 34 | virtual std::vector<PerceptionInterfaceType> SetupConfiguration( |
| 35 | const std::string& configuration_name, |
| 36 | SerializedSuccessStatus* success_status) = 0; |
| 37 | }; |
| 38 | |
| 39 | } // namespace mri |
| 40 | |
| 41 | #endif // MEDIA_PERCEPTION_RTANALYTICS_H_ |