mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 15:09:31 +02:00
Read widget event types from NSE
This commit is contained in:
42
Riot/Managers/Widgets/WidgetConstants.h
Normal file
42
Riot/Managers/Widgets/WidgetConstants.h
Normal file
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
The type of matrix event used for matrix widgets.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString *const kWidgetMatrixEventTypeString;
|
||||
|
||||
/**
|
||||
The type of matrix event used for modular widgets.
|
||||
TODO: It should be replaced by kWidgetMatrixEventTypeString.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString *const kWidgetModularEventTypeString;
|
||||
|
||||
/**
|
||||
Known types widgets.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString *const kWidgetTypeJitsiV1;
|
||||
FOUNDATION_EXPORT NSString *const kWidgetTypeJitsiV2;
|
||||
FOUNDATION_EXPORT NSString *const kWidgetTypeStickerPicker;
|
||||
|
||||
@interface WidgetConstants : NSObject
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
27
Riot/Managers/Widgets/WidgetConstants.m
Normal file
27
Riot/Managers/Widgets/WidgetConstants.m
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#import "WidgetConstants.h"
|
||||
|
||||
NSString *const kWidgetMatrixEventTypeString = @"m.widget";
|
||||
NSString *const kWidgetModularEventTypeString = @"im.vector.modular.widgets";
|
||||
NSString *const kWidgetTypeJitsiV1 = @"jitsi";
|
||||
NSString *const kWidgetTypeJitsiV2 = @"m.jitsi";
|
||||
NSString *const kWidgetTypeStickerPicker = @"m.stickerpicker";
|
||||
|
||||
@implementation WidgetConstants
|
||||
|
||||
@end
|
||||
@@ -20,27 +20,10 @@
|
||||
#import <MatrixSDK/MatrixSDK.h>
|
||||
|
||||
#import "Widget.h"
|
||||
#import "WidgetConstants.h"
|
||||
|
||||
@class WidgetManagerConfig;
|
||||
|
||||
/**
|
||||
The type of matrix event used for matrix widgets.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString *const kWidgetMatrixEventTypeString;
|
||||
|
||||
/**
|
||||
The type of matrix event used for modular widgets.
|
||||
TODO: It should be replaced by kWidgetMatrixEventTypeString.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString *const kWidgetModularEventTypeString;
|
||||
|
||||
/**
|
||||
Known types widgets.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString *const kWidgetTypeJitsiV1;
|
||||
FOUNDATION_EXPORT NSString *const kWidgetTypeJitsiV2;
|
||||
FOUNDATION_EXPORT NSString *const kWidgetTypeStickerPicker;
|
||||
|
||||
/**
|
||||
Posted when a widget has been created, updated or disabled.
|
||||
The notification object is the `Widget` instance.
|
||||
|
||||
@@ -24,12 +24,6 @@
|
||||
|
||||
#pragma mark - Contants
|
||||
|
||||
NSString *const kWidgetMatrixEventTypeString = @"m.widget";
|
||||
NSString *const kWidgetModularEventTypeString = @"im.vector.modular.widgets";
|
||||
NSString *const kWidgetTypeJitsiV1 = @"jitsi";
|
||||
NSString *const kWidgetTypeJitsiV2 = @"m.jitsi";
|
||||
NSString *const kWidgetTypeStickerPicker = @"m.stickerpicker";
|
||||
|
||||
NSString *const kWidgetManagerDidUpdateWidgetNotification = @"kWidgetManagerDidUpdateWidgetNotification";
|
||||
|
||||
NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain";
|
||||
|
||||
@@ -27,3 +27,4 @@ INFOPLIST_FILE = RiotNSE/Info.plist
|
||||
CODE_SIGN_ENTITLEMENTS = RiotNSE/RiotNSE.entitlements
|
||||
|
||||
SKIP_INSTALL = YES
|
||||
SWIFT_OBJC_BRIDGING_HEADER = $(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/RiotNSE-Bridging-Header.h
|
||||
|
||||
22
RiotNSE/SupportingFiles/RiotNSE-Bridging-Header.h
Normal file
22
RiotNSE/SupportingFiles/RiotNSE-Bridging-Header.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#ifndef RiotNSE_Bridging_Header_h
|
||||
#define RiotNSE_Bridging_Header_h
|
||||
|
||||
#import "WidgetConstants.h"
|
||||
|
||||
#endif /* RiotNSE_Bridging_Header_h */
|
||||
@@ -58,3 +58,4 @@ targets:
|
||||
- path: ../Riot/Utils/Constants.swift
|
||||
- path: ../Riot/Categories/String.swift
|
||||
- path: ../Riot/Categories/Character.swift
|
||||
- path: ../Riot/Managers/Widgets/WidgetConstants.m
|
||||
|
||||
Reference in New Issue
Block a user