1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- //
- // APIS.swift
- // example_code_react_native
- //
- // Created by Akhmad Al Qindi Irsyam on 27/06/23.
- //
- import Foundation
- import NexilisLite
- @objc(CallNative)
- class CallNative: NSObject, ConnectDelegate {
- func onSuccess(userId: String) {
-
- }
-
- func onFailed(error: String) {
-
- }
-
- @objc func connect() {
- APIS.connect(apiKey: "1C4FA430BC9F44484AFBE99C8974D70B68CE7891DBE83505CBF01205DE51FC18", delegate: self) //***REPLACE WITH YOUR API KEY***
- }
-
- @objc func openContactCenter() {
- DispatchQueue.main.async {
- APIS.openContactCenter()
- }
- }
- @objc func openChat() {
- DispatchQueue.main.async {
- APIS.openChat()
- }
- }
- @objc func openCall() {
- DispatchQueue.main.async {
- APIS.openCall()
- }
- }
- @objc func openStreaming() {
- DispatchQueue.main.async {
- APIS.openStreaming()
- }
- }
- @objc func openSetting() {
- DispatchQueue.main.async {
- APIS.openSetting()
- }
- }
- @objc func openProfile() {
- DispatchQueue.main.async {
- APIS.openProfile()
- }
- }
- @objc func openWhiteboard() {
- DispatchQueue.main.async {
- APIS.openWhiteboard()
- }
- }
- @objc func openScreenSharing() {
- DispatchQueue.main.async {
- APIS.openScreenSharing()
- }
- }
- @objc(openContactCenterChat:)
- func openContactCenterChat(category: Int) {
- print("category \(category)")
- DispatchQueue.main.async {
- APIS.openContactCenter(media: 0, category: category)
- }
- }
- @objc(openContactCenterAudioCall:)
- func openContactCenterAudioCall(category: Int) {
- DispatchQueue.main.async {
- APIS.openContactCenter(media: 1, category: category)
- }
- }
- @objc(openContactCenterVideoCall:)
- func openContactCenterVideoCall(category: Int) {
- DispatchQueue.main.async {
- APIS.openContactCenter(media: 2, category: category)
- }
- }
- @objc(signInAdmin:)
- func signInAdmin(pwd: String) {
- DispatchQueue.main.async {
- APIS.signInAdmin(password: pwd)
- }
- }
- @objc func openSetOfficer() {
- DispatchQueue.main.async {
- APIS.openSetAsOfficerForm()
- }
- }
- }
|