1 /* 2 * Copyright (C) 2022 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 ACCESSIBILITY_GESTURE_INJECT_PATH_PARCEL_H 17 #define ACCESSIBILITY_GESTURE_INJECT_PATH_PARCEL_H 18 19 #include "accessibility_gesture_inject_path.h" 20 #include "parcel.h" 21 22 namespace OHOS { 23 namespace Accessibility { 24 class AccessibilityGestureInjectPathParcel : public AccessibilityGestureInjectPath, public Parcelable { 25 public: 26 AccessibilityGestureInjectPathParcel() = default; 27 AccessibilityGestureInjectPathParcel(const AccessibilityGestureInjectPath &gesturePath); 28 29 /** 30 * @brief read this sequenceable object from a Parcel. 31 * @param parcel Indicates the Parcel object into which the sequenceable object has been marshaled. 32 * @return Return true if read successfully, else return false. 33 */ 34 bool ReadFromParcel(Parcel &parcel); 35 36 /** 37 * @brief Marshals this sequenceable object into a Parcel. 38 * @param parcel Indicates the Parcel object to which the sequenceable object will be marshaled. 39 * @return Return true if Marshal successfully, else return false. 40 */ 41 bool Marshalling(Parcel &parcel) const override; 42 43 /** 44 * @brief Unmarshals this sequenceable object from a Parcel. 45 * @param parcel Indicates the Parcel object into which the sequenceable object has been marshaled. 46 * @return Return a sequenceable object of AccessibilityGestureInjectPathParcel. 47 */ 48 static sptr<AccessibilityGestureInjectPathParcel> Unmarshalling(Parcel &parcel); 49 }; 50 } // namespace Accessibility 51 } // namespace OHOS 52 #endif // ACCESSIBILITY_GESTURE_INJECT_PATH_PARCEL_H