当前位置: 首页>>代码示例>>C++>>正文


C++ BluetoothHfpManager::HandleCallStateChanged方法代码示例

本文整理汇总了C++中BluetoothHfpManager::HandleCallStateChanged方法的典型用法代码示例。如果您正苦于以下问题:C++ BluetoothHfpManager::HandleCallStateChanged方法的具体用法?C++ BluetoothHfpManager::HandleCallStateChanged怎么用?C++ BluetoothHfpManager::HandleCallStateChanged使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BluetoothHfpManager的用法示例。


在下文中一共展示了BluetoothHfpManager::HandleCallStateChanged方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

/**
 * @param aSend A boolean indicates whether we need to notify headset or not
 */
nsresult
TelephonyListener::HandleCallInfo(nsITelephonyCallInfo* aInfo, bool aSend)
{
  BluetoothHfpManager* hfp = BluetoothHfpManager::Get();
  NS_ENSURE_TRUE(hfp, NS_ERROR_FAILURE);

  uint32_t callIndex;
  uint16_t callState;
  nsAutoString number;
  nsAutoString disconnectedReason;
  bool isOutgoing;
  bool isConference;

  aInfo->GetCallIndex(&callIndex);
  aInfo->GetCallState(&callState);
  aInfo->GetNumber(number);
  aInfo->GetDisconnectedReason(disconnectedReason);
  aInfo->GetIsOutgoing(&isOutgoing);
  aInfo->GetIsConference(&isConference);

  // The disconnectedReason of a disconnected call must be nonempty no matter
  // the call is disconnected for a normal reason or an error.
  MOZ_ASSERT((callState != nsITelephonyService::CALL_STATE_DISCONNECTED ||
              !disconnectedReason.IsEmpty()),
             "disconnectedReason of an disconnected call must be nonempty.");
  hfp->HandleCallStateChanged(callIndex, callState, disconnectedReason, number,
                              isOutgoing, isConference, aSend);
  return NS_OK;
}
开发者ID:,项目名称:,代码行数:32,代码来源:

示例2: EmptyString

NS_IMETHODIMP
TelephonyListener::EnumerateCallState(uint32_t aServiceId,
                                      uint32_t aCallIndex,
                                      uint16_t aCallState,
                                      const nsAString_internal& aNumber,
                                      bool aIsOutgoing,
                                      bool aIsEmergency,
                                      bool aIsConference,
                                      bool aIsSwitchable,
                                      bool aIsMergeable)
{
  BluetoothHfpManager* hfp = BluetoothHfpManager::Get();
  NS_ENSURE_TRUE(hfp, NS_ERROR_FAILURE);

  hfp->HandleCallStateChanged(aCallIndex, aCallState, EmptyString(), aNumber,
                              aIsOutgoing, aIsConference, false);
  return NS_OK;
}
开发者ID:anaran,项目名称:gecko-dev,代码行数:18,代码来源:BluetoothRilListener.cpp

示例3: EmptyString

/**
 * @param aSend A boolean indicates whether we need to notify headset or not
 */
nsresult
TelephonyListener::HandleCallInfo(nsITelephonyCallInfo* aInfo, bool aSend)
{
  BluetoothHfpManager* hfp = BluetoothHfpManager::Get();
  NS_ENSURE_TRUE(hfp, NS_ERROR_FAILURE);

  uint32_t callIndex;
  uint16_t callState;
  nsAutoString number;
  bool isOutgoing;
  bool isConference;

  aInfo->GetCallIndex(&callIndex);
  aInfo->GetCallState(&callState);
  aInfo->GetNumber(number);
  aInfo->GetIsOutgoing(&isOutgoing);
  aInfo->GetIsConference(&isConference);

  hfp->HandleCallStateChanged(callIndex, callState, EmptyString(), number,
                              isOutgoing, isConference, aSend);
  return NS_OK;
}
开发者ID:Mardak,项目名称:tiles-dev,代码行数:25,代码来源:BluetoothRilListener.cpp


注:本文中的BluetoothHfpManager::HandleCallStateChanged方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。