1 /** 2 * Copyright (C) 2024 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 #ifndef ANBRMODE_H 18 #define ANBRMODE_H 19 20 #include <binder/Parcel.h> 21 #include <binder/Parcelable.h> 22 #include <binder/Status.h> 23 #include <stdint.h> 24 25 namespace android 26 { 27 28 namespace telephony 29 { 30 31 namespace imsmedia 32 { 33 34 /** Native representation of android.telephony.imsmedia.AnbrMode */ 35 36 /** 37 * The class represents ANBR parameters. 38 */ 39 class AnbrMode : public Parcelable 40 { 41 public: 42 AnbrMode(); 43 AnbrMode(AnbrMode& param); 44 virtual ~AnbrMode(); 45 AnbrMode& operator=(const AnbrMode& param); 46 bool operator==(const AnbrMode& param) const; 47 bool operator!=(const AnbrMode& param) const; 48 virtual status_t writeToParcel(Parcel* parcel) const; 49 virtual status_t readFromParcel(const Parcel* in); 50 void setAnbrUplinkCodecMode(const int32_t uplinkMode); 51 int32_t getAnbrUplinkCodecMode(); 52 void setAnbrDownlinkCodecMode(const int32_t downlinkMode); 53 int32_t getAnbrDownlinkCodecMode(); 54 void setDefaultAnbrMode(); 55 56 private: 57 /** The codec mode of the current activated code in EvsParams and AmrParams */ 58 int32_t anbrUplinkMode; 59 60 /** The codec mode of the current activated code in EvsParams and AmrParams */ 61 int32_t anbrDownlinkMode; 62 63 // Default AnbrMode 64 const int32_t kAnbrUplinkMode = 0; 65 const int32_t kAnbrDownlinkMode = 0; 66 }; 67 68 } // namespace imsmedia 69 70 } // namespace telephony 71 72 } // namespace android 73 74 #endif 75