Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

JitsiMeetContext.swift 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright @ 2018-present 8x8, Inc.
  3. * Copyright @ 2017-2018 Atlassian Pty Ltd
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. import Foundation
  18. class JitsiMeetContext {
  19. private var dictionary : [String : Any]
  20. var joinConferenceURL : String? = nil;
  21. init() {
  22. dictionary = [:]
  23. }
  24. init(context: [String : Any]) {
  25. dictionary = context
  26. }
  27. init(jmContext: JitsiMeetContext) {
  28. dictionary = jmContext.dictionary
  29. joinConferenceURL = jmContext.joinConferenceURL
  30. }
  31. var conferenceURL : String? {
  32. get {
  33. return dictionary["conferenceURL"] as? String
  34. }
  35. }
  36. var conferenceTimestamp : Int64? {
  37. get {
  38. return dictionary["conferenceTimestamp"] as? Int64;
  39. }
  40. }
  41. var sessionID : Int64? {
  42. get {
  43. return dictionary["sessionID"] as? Int64;
  44. }
  45. }
  46. var recentURLs : NSArray? {
  47. get {
  48. return dictionary["recentURLs"] as? NSArray
  49. }
  50. }
  51. var micMuted : Bool? {
  52. get {
  53. return (dictionary["micMuted"] as? NSNumber)?.boolValue ?? nil;
  54. }
  55. }
  56. public var description: String {
  57. return "JitsiMeetContext[conferenceURL: \(String(describing: conferenceURL)), conferenceTimestamp: \(String(describing:conferenceTimestamp)), sessionID: \(String(describing:sessionID)), recentURLs: \(String(describing:recentURLs)), joinConferenceURL: \(String(describing:joinConferenceURL)) "
  58. }
  59. }