1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- //
- // 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 openWhiteboard(_ call: CAPPluginCall) {
- DispatchQueue.main.async {
- APIS.openWhiteboard()
- }
- }
- @objc func openNotificationCenter(_ call: CAPPluginCall) {
- DispatchQueue.main.async {
- APIS.openNotificationCenter()
- }
- }
- @objc func openSecureFolder(_ call: CAPPluginCall) {
- DispatchQueue.main.async {
- APIS.openSecureFolder()
- }
- }
- }
|