"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-6437/ios/app/watchos/extension/JitsiMeetContext.swift" (7 Aug 2022, 2028 Bytes) of package /linux/misc/jitsi-meet-6437.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Swift source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.


    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 
   18 import Foundation
   19 
   20 class JitsiMeetContext {
   21     private var dictionary : [String : Any]
   22 
   23     var joinConferenceURL : String? = nil;
   24 
   25     init() {
   26         dictionary = [:]
   27     }
   28   
   29     init(context: [String : Any]) {
   30         dictionary = context
   31     }
   32   
   33     init(jmContext: JitsiMeetContext) {
   34         dictionary = jmContext.dictionary
   35         joinConferenceURL = jmContext.joinConferenceURL
   36     }
   37   
   38     var conferenceURL : String? {
   39         get {
   40             return dictionary["conferenceURL"] as? String
   41         }
   42     }
   43   
   44     var conferenceTimestamp : Int64? {
   45         get {
   46             return dictionary["conferenceTimestamp"] as? Int64;
   47         }
   48     }
   49   
   50     var sessionID : Int64? {
   51         get {
   52             return dictionary["sessionID"] as? Int64;
   53         }
   54     }
   55   
   56     var recentURLs : NSArray? {
   57         get {
   58             return dictionary["recentURLs"] as? NSArray
   59         }
   60     }
   61   
   62     var micMuted : Bool? {
   63         get {
   64             return (dictionary["micMuted"] as? NSNumber)?.boolValue ?? nil;
   65         }
   66     }
   67   
   68     public var description: String {
   69         return "JitsiMeetContext[conferenceURL: \(String(describing: conferenceURL)), conferenceTimestamp: \(String(describing:conferenceTimestamp)), sessionID: \(String(describing:sessionID)), recentURLs: \(String(describing:recentURLs)), joinConferenceURL: \(String(describing:joinConferenceURL)) "
   70     }
   71 }