123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- //
- // 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) {
- print("SUCCESS HMM \(userId)")
- }
-
- func onFailed(error: String) {
- print("FAILED HMM")
- }
-
- @objc func connect() {
- print("CONNECTSKUTT")
- APIS.connect(apiKey: "***REPLACE***WITH***YOUR***ACCOUNT***", delegate: self, showButton: false)
- }
-
- @objc func openContactCenter() {
- print("openContactCenter")
- DispatchQueue.main.async {
- APIS.openContactCenter()
- }
- }
- @objc func openChat() {
- print("openChat")
- DispatchQueue.main.async {
- APIS.openChat()
- }
- }
- @objc func openCall() {
- print("openCall")
- DispatchQueue.main.async {
- APIS.openCall()
- }
- }
- @objc func openStreaming() {
- print("openStreaming")
- DispatchQueue.main.async {
- APIS.openStreaming()
- }
- }
- @objc func openSetting() {
- print("openSetting")
- DispatchQueue.main.async {
- APIS.openSetting()
- }
- }
- @objc func openWhiteboard() {
- print("openWhiteboard")
- DispatchQueue.main.async {
- APIS.openWhiteboard()
- }
- }
- @objc func openNotificationCenter() {
- print("openNotificationCenter")
- DispatchQueue.main.async {
- APIS.openNotificationCenter()
- }
- }
- @objc(openContactCenterChat:)
- func openContactCenterChat(category: Int) {
- print("openContactCenterChat \(category)")
- DispatchQueue.main.async {
- APIS.openContactCenter(media: 0, category: category)
- }
- }
- @objc(openContactCenterAudioCall:)
- func openContactCenterAudioCall(category: Int) {
- print("openContactCenterAudioCall")
- DispatchQueue.main.async {
- APIS.openContactCenter(media: 1, category: category)
- }
- }
- @objc(openContactCenterVideoCall:)
- func openContactCenterVideoCall(category: Int) {
- print("openContactCenterVideoCall")
- DispatchQueue.main.async {
- APIS.openContactCenter(media: 2, category: category)
- }
- }
- @objc(signInAdmin:)
- func signInAdmin(pwd: String) {
- print("signInAdmin")
- DispatchQueue.main.async {
- APIS.signInAdmin(password: pwd)
- }
- }
- @objc func openSetOfficer() {
- print("openSetOfficer")
- DispatchQueue.main.async {
- APIS.openSetAsOfficerForm()
- }
- }
- @objc func openProfile() {
- print("openProfile")
- DispatchQueue.main.async {
- APIS.openProfile()
- }
- }
- }
|