blob: 46c92e0412f9a99c7b0598ac62f4fc82974ee4eb [file] [log] [blame]
Yifan Hong2a90ffe2018-03-05 17:45:34 -08001/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "MatrixInstance.h"
18
19#include <utility>
20
21namespace android {
22namespace vintf {
23
24MatrixInstance::MatrixInstance(FqInstance&& fqInstance, VersionRange&& range, bool optional)
25 : mFqInstance(std::move(fqInstance)), mRange(std::move(range)), mOptional(optional) {}
26
27MatrixInstance::MatrixInstance(const FqInstance fqInstance, const VersionRange& range,
28 bool optional)
29 : mFqInstance(fqInstance), mRange(range), mOptional(optional) {}
30
31const std::string& MatrixInstance::package() const {
32 return mFqInstance.getPackage();
33}
34
35const VersionRange& MatrixInstance::versionRange() const {
36 return mRange;
37}
38
39const std::string& MatrixInstance::interface() const {
40 return mFqInstance.getInterface();
41}
42
43const std::string& MatrixInstance::instance() const {
44 return mFqInstance.getInstance();
45}
46
47bool MatrixInstance::optional() const {
48 return mOptional;
49}
50
51} // namespace vintf
52} // namespace android