Reference of FileChannel
Description of FileChannel
PTTClient PTTChannel Group FileChannel
FileChannel Class
| name | type | attributes | description |
| ID | int | readonly | FileChannel instance ID |
| channelID | int | readonly | Channel ID |
| fileSize | long64 | readonly | File size |
| fileName | string | | File name |
| filePath | string | | File path |
| channelType | int | readonly | Channel type (1:Sender, 2:Receiver) |
| encrypted | boolean | readonly | Is a encrypted channel |
| ownerID | string | readonly | Channel Owner ID |
| ownerName | string | readonly | Channel Owner Name |
| Events |
- void onFileChannelError(FileChannel ChannelInstance, int ErrorCode, string ErrorMesssage)
- void onFileChannelResult(FileChannel ChannelInstance, int Seq, int ResultCode, string ResultMesssage)
- void onFileChannelCreated(FileChannel ChannelInstance, int ChannelID)
- void onFileChannelStreamStarted(FileChannel ChannelInstance)
- void onFileChannelStreamStopped(FileChannel ChannelInstance)
- void onFileChannelTrackDataCaptured(FileChannel ChannelInstance, byte[] TrackDataBuffer, long64 DataLength)
- void onFileChannelTrackDataReceived(FileChannel ChannelInstance, byte[] TrackDataBuffer, long64 DataLength)
|
Methods
createChannel
| int createChannel(string ChannelAttributesJson) |
| ChannelAttributesJson | FileChannelAttributesJson |
| Return | Request Sequence ID. If less then 0, ErrorCode. |
| Expected Events | onFileChannelCreated() |
| Description | Create a file channel |
| Android SDK | 4.0.0 |
| iOS SDK | 4.0.0 |
| Windows SDK | 4.0.0 |
| Linux SDK | Not supported yet |
< FileChannelAttributesJson >
| field | type | Description | Default | C | R | U | D |
| FileID | int | id for file. unique key is not required. | | M | | | |
| FileName | string | file name | | M | | | |
| FilePath | string | file location without file name | | | M | | |
startStream
| int startStream() |
| Return | 0:Call Success, 0<ErrorCode |
| Expected Events | onFileChannelStreamStarted() |
| Description | Start video stream |
| Android SDK | 4.0.0 |
| iOS SDK | 4.0.0 |
| Windows SDK | 4.0.0 |
| Linux SDK | Not supported yet |
stopStream
| int stopStream() |
| Return | 0:Call Success, 0<ErrorCode |
| Expected Events | onFileChannelStreamStopped() |
| Description | Stop video stream |
| Android SDK | 4.0.0 |
| iOS SDK | 4.0.0 |
| Windows SDK | 4.0.0 |
| Linux SDK | Not supported yet |
Events
onFileChannelError
| void onFileChannelError(FileChannel ChannelInstance, int ErrorCode, string ErrorMesssage) |
| ChannelInstance | FileChannel instance of event |
| ErrorCode | Error code. see Main 7 |
| ErrorMesssage | Error message |
| Description | Errer event |
| Android SDK | 4.0.0 |
| iOS SDK | 4.0.0 |
| Windows SDK | 4.0.0 |
| Linux SDK | Not supported yet |
onFileChannelResult
| void onFileChannelResult(FileChannel ChannelInstance, int Seq, int ResultCode, string ResultMesssage) |
| ChannelInstance | FileChannel instance of event |
| Seq | Requested Sequence ID |
| ResultCode | Error code. see Main 8 |
| ResultMesssage | Error message |
| Description | Result event for request |
| Android SDK | 4.0.0 |
| iOS SDK | 4.0.0 |
| Windows SDK | 4.0.0 |
| Linux SDK | Not supported yet |
onFileChannelCreated
| void onFileChannelCreated(FileChannel ChannelInstance, int ChannelID) |
| ChannelInstance | FileChannel instance of event |
| ChannelID | Created FileChannel's ID |
| Description | File Channel is created |
| Android SDK | 4.0.0 |
| iOS SDK | 4.0.0 |
| Windows SDK | 4.0.0 |
| Linux SDK | Not supported yet |
onFileChannelStreamStarted
| void onFileChannelStreamStarted(FileChannel ChannelInstance) |
| ChannelInstance | FileChannel instance of event |
| Description | File stream is started. |
| Android SDK | 4.0.0 |
| iOS SDK | 4.0.0 |
| Windows SDK | 4.0.0 |
| Linux SDK | Not supported yet |
onFileChannelStreamStopped
| void onFileChannelStreamStopped(FileChannel ChannelInstance) |
| ChannelInstance | FileChannel instance of event |
| Description | File stream is stopped. |
| Android SDK | 4.0.0 |
| iOS SDK | 4.0.0 |
| Windows SDK | 4.0.0 |
| Linux SDK | Not supported yet |
onFileChannelTrackDataCaptured
| void onFileChannelTrackDataCaptured(FileChannel ChannelInstance, byte[] TrackDataBuffer, long64 DataLength) |
| ChannelInstance | FileChannel instance of event |
| TrackDataBuffer | Buffer of data. |
| DataLength | Data size |
| Description | Track data is captured from device. |
| Android SDK | 4.0.0 |
| iOS SDK | 4.0.0 |
| Windows SDK | 4.0.0 |
| Linux SDK | Not supported yet |
onFileChannelTrackDataReceived
| void onFileChannelTrackDataReceived(FileChannel ChannelInstance, byte[] TrackDataBuffer, long64 DataLength) |
| ChannelInstance | FileChannel instance of event |
| TrackDataBuffer | Buffer of data. |
| DataLength | Data size |
| Description | Track data is received from server. |
| Android SDK | 4.0.0 |
| iOS SDK | 4.0.0 |
| Windows SDK | 4.0.0 |
| Linux SDK | Not supported yet |