123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- //
- // MyPlugin.swift
- // App
- //
- // Created by Akhmad Al Qindi Irsyam on 27/06/23.
- //
- import Foundation
- import Capacitor
- import NexilisLite
- @objc(NativeCap)
- public class NativeCap: CAPPlugin {
- @objc func openContactCenter(_ call: CAPPluginCall) {
- DispatchQueue.main.async {
- APIS.openContactCenter()
- }
- }
- @objc func openChat(_ call: CAPPluginCall) {
- DispatchQueue.main.async {
- APIS.openChat()
- }
- }
- @objc func openCall(_ call: CAPPluginCall) {
- DispatchQueue.main.async {
- APIS.openCall()
- }
- }
- @objc func openStreaming(_ call: CAPPluginCall) {
- DispatchQueue.main.async {
- APIS.openStreaming()
- }
- }
- @objc func openSetOfficer(_ call: CAPPluginCall) {
- DispatchQueue.main.async {
- APIS.openSetAsOfficerForm()
- }
- }
- @objc func openSettings(_ call: CAPPluginCall) {
- DispatchQueue.main.async {
- APIS.openSetting()
- }
- }
- @objc func openProfile(_ call: CAPPluginCall) {
- DispatchQueue.main.async {
- APIS.openProfile()
- }
- }
- @objc func openContactCenterChat(_ call: CAPPluginCall) {
- let media = 0
- let category = call.options["category"]
- print("HEHE \(category)")
- DispatchQueue.main.async {
- APIS.openContactCenter(media: media, category: category as? Int)
- }
- }
- @objc func openContactCenterAudioCall(_ call: CAPPluginCall) {
- let media = 1
- let category = call.options["category"]
- DispatchQueue.main.async {
- APIS.openContactCenter(media: media, category: category as? Int)
- }
- }
- @objc func openContactCenterVideoCall(_ call: CAPPluginCall) {
- let media = 2
- let category = call.options["category"]
- DispatchQueue.main.async {
- APIS.openContactCenter(media: media, category: category as? Int)
- }
- }
- @objc func adminSignIn(_ call: CAPPluginCall) {
- let password = call.options["pwd"] ?? ""
- DispatchQueue.main.async {
- APIS.signInAdmin(password: password as! String)
- }
- }
- @objc func openScreenSharing(_ call: CAPPluginCall) {
- DispatchQueue.main.async {
- APIS.openScreenSharing()
- }
- }
- @objc func openWhiteboard(_ call: CAPPluginCall) {
- DispatchQueue.main.async {
- APIS.openWhiteboard()
- }
- }
- }
|