Agora Java API Reference for Android

Public Member Functions | List of all members
agora::IDataChannelObserver Class Reference

## Public Member Functions
virtual void | onLocalDataChannelPublished (agora_refptr< ILocalDataChannel > channel)
virtual void | onRemoteDataChannelSubscribed (agora_refptr< IRemoteDataChannel > channel)
virtual void | onRemoteDataChannelUnsubscribed (agora_refptr< IRemoteDataChannel > channel)
virtual void | onRemoteDataPacketReceived (const UserDataChannelInfo &info, util::AString packet)
virtual void | onRemoteDataChannelInfoUpdated (const UserDataChannelInfo *modified_infos, size_t modified_infos_size, const UserDataChannelInfo *deleted_infos, size_t deleted_infos_size)

## Member Function Documentation

## ◆ onLocalDataChannelPublished()

virtual void agora::IDataChannelObserver::onLocalDataChannelPublished | ( | agora_refptr< ILocalDataChannel > | channel | ) |
| virtual

Occurs when the channe is ready to send the data packet.

Parameters

  channel | the published channel.

## ◆ onRemoteDataChannelSubscribed()

virtual void agora::IDataChannelObserver::onRemoteDataChannelSubscribed | ( | agora_refptr< IRemoteDataChannel > | channel | ) |
| virtual

Occurs when the the channe is added and ready to receive data packet.

Parameters

  channel | the remote channel pointer.

## ◆ onRemoteDataChannelUnsubscribed()

virtual void agora::IDataChannelObserver::onRemoteDataChannelUnsubscribed | ( | agora_refptr< IRemoteDataChannel > | channel | ) |
| virtual

Occurs when the the channe is removed.

Parameters

  channel | the remote channel pointer.

## ◆ onRemoteDataPacketReceived()

virtual void agora::IDataChannelObserver::onRemoteDataPacketReceived | ( | const UserDataChannelInfo & | info,
|  | util::AString | packet
| ) |  |
| virtual

Occurs when the packet is received.

Parameters

  info | the channel Info.
  packet | the received packet.

## ◆ onRemoteDataChannelInfoUpdated()

virtual void agora::IDataChannelObserver::onRemoteDataChannelInfoUpdated | ( | const UserDataChannelInfo * | modified_infos,
|  | size_t | modified_infos_size,
|  | const UserDataChannelInfo * | deleted_infos,
|  | size_t | deleted_infos_size
| ) |  |
| virtual

Occurs when the remote data channel info updated.

Parameters

  modified_infos | the modifed channel Infos, add or update.
  modified_infos_size | the size of modifed channel Infos .
  deleted_infos | the deleted channel Infos.
  deleted_infos_size | the size of deleted channel Infos .