199da06d0Sopenharmony_ci/**
299da06d0Sopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
399da06d0Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
499da06d0Sopenharmony_ci * you may not use this file except in compliance with the License.
599da06d0Sopenharmony_ci * You may obtain a copy of the License at
699da06d0Sopenharmony_ci *
799da06d0Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
899da06d0Sopenharmony_ci *
999da06d0Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1099da06d0Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1199da06d0Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1299da06d0Sopenharmony_ci * See the License for the specific language governing permissions and
1399da06d0Sopenharmony_ci * limitations under the License.
1499da06d0Sopenharmony_ci */
1599da06d0Sopenharmony_ci
1699da06d0Sopenharmony_ci/**
1799da06d0Sopenharmony_ci * @file: Call status management
1899da06d0Sopenharmony_ci */
1999da06d0Sopenharmony_ci
2099da06d0Sopenharmony_ci/**
2199da06d0Sopenharmony_ci * class CallStateManager
2299da06d0Sopenharmony_ci */
2399da06d0Sopenharmony_ciexport default class CallStateManager {
2499da06d0Sopenharmony_ci  private callData = [];
2599da06d0Sopenharmony_ci  private static sCallStateManager: CallStateManager;
2699da06d0Sopenharmony_ci
2799da06d0Sopenharmony_ci  constructor(callData) {
2899da06d0Sopenharmony_ci    this.callData = callData;
2999da06d0Sopenharmony_ci  }
3099da06d0Sopenharmony_ci
3199da06d0Sopenharmony_ci  /**
3299da06d0Sopenharmony_ci   * update callData
3399da06d0Sopenharmony_ci   *
3499da06d0Sopenharmony_ci   * @param { Object } data - callData
3599da06d0Sopenharmony_ci   */
3699da06d0Sopenharmony_ci  public static getInstance(): CallStateManager {
3799da06d0Sopenharmony_ci    return CallStateManager.sCallStateManager;
3899da06d0Sopenharmony_ci  }
3999da06d0Sopenharmony_ci
4099da06d0Sopenharmony_ci  public update(data) {
4199da06d0Sopenharmony_ci    Object.assign(this.callData, {
4299da06d0Sopenharmony_ci      ...data
4399da06d0Sopenharmony_ci    });
4499da06d0Sopenharmony_ci  }
4599da06d0Sopenharmony_ci}