• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef OHOS_AVSESSION_DESCRIPTOR_H
17 #define OHOS_AVSESSION_DESCRIPTOR_H
18 
19 #include "parcel.h"
20 #include "element_name.h"
21 
22 namespace OHOS::AVSession {
23 struct DeviceInfo {
24     bool WriteToParcel(Parcel& out) const;
25     bool ReadFromParcel(Parcel& in);
26 
27     int32_t castCategory_;
28     std::string deviceId_;
29     std::string deviceName_;
30     int32_t deviceType_;
31     std::string ipAddress_;
32     int32_t providerId_;
33 };
34 
35 struct OutputDeviceInfo {
36     bool WriteToParcel(Parcel& out) const;
37     bool ReadFromParcel(Parcel& in);
38 
39     std::vector<DeviceInfo> deviceInfos_;
40 };
41 
42 struct AVHistoryDescriptor {
43     bool WriteToParcel(Parcel& out) const;
44     bool ReadFromParcel(Parcel& in);
45 
46     std::string sessionId_;
47     std::string bundleName_;
48     std::string abilityName_;
49 };
50 
51 struct AVSessionDescriptor {
52     bool WriteToParcel(Parcel& out) const;
53     bool ReadFromParcel(Parcel& in);
54 
55     std::string sessionId_;
56     int32_t sessionType_ {};
57     std::string sessionTag_;
58     AppExecFwk::ElementName elementName_;
59     pid_t pid_ {};
60     pid_t uid_ {};
61     bool isActive_ {};
62     bool isTopSession_ {};
63     bool isThirdPartyApp_ {};
64     OutputDeviceInfo outputDeviceInfo_;
65 };
66 
67 struct AVSessionBasicInfo {
68     std::string deviceName_;
69     std::string networkId_;
70     std::string vendorId_;
71     std::string deviceType_;
72     std::string systemVersion_;
73     int32_t sessionVersion_ {};
74     std::vector<int32_t> reserve_;
75     std::vector<int32_t> feature_;
76     std::vector<int32_t> metaDataCap_;
77     std::vector<int32_t> playBackStateCap_;
78     std::vector<int32_t> controlCommandCap_;
79     std::vector<int32_t> extendCapability_;
80     int32_t systemTime_ {};
81     std::vector<int32_t> extend_;
82 };
83 } // namespace OHOS::AVSession
84 #endif // OHOS_AVSESSION_DESCRIPTOR_H