mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 23:48:29 +02:00
Structure project almost by features. Start by organizing view controllers.
This commit is contained in:
58
Riot/Modules/RoomKeyRequest/RoomKeyRequestViewController.h
Normal file
58
Riot/Modules/RoomKeyRequest/RoomKeyRequestViewController.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
Copyright 2017 Vector Creations 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 <UIKit/UIKit.h>
|
||||
|
||||
#import <MatrixSDK/MatrixSDK.h>
|
||||
#import <MatrixKit/MatrixKit.h>
|
||||
|
||||
/**
|
||||
The `RoomKeyRequestViewController` display a modal dialog at the top of the
|
||||
application asking the user if he wants to share room keys with a user's device.
|
||||
For the moment, the user is himself.
|
||||
*/
|
||||
@interface RoomKeyRequestViewController : NSObject <MXKEncryptionInfoViewDelegate>
|
||||
|
||||
/**
|
||||
The UIAlertController instance which handles the dialog.
|
||||
*/
|
||||
@property (nonatomic, readonly) UIAlertController *alertController;
|
||||
|
||||
@property (nonatomic, readonly) MXSession *mxSession;
|
||||
@property (nonatomic, readonly) MXDeviceInfo *device;
|
||||
|
||||
/**
|
||||
Initialise an `RoomKeyRequestViewController` instance.
|
||||
|
||||
@param deviceInfo the device to share keys to.
|
||||
@param wasNewDevice flag indicating whether this is the first time we meet the device.
|
||||
@param session the related matrix session.
|
||||
@param onComplete a block called when the the dialog is closed.
|
||||
@return the newly created instance.
|
||||
*/
|
||||
- (instancetype)initWithDeviceInfo:(MXDeviceInfo*)deviceInfo wasNewDevice:(BOOL)wasNewDevice andMatrixSession:(MXSession*)session onComplete:(void (^)())onComplete;
|
||||
|
||||
/**
|
||||
Show the dialog in a modal way.
|
||||
*/
|
||||
- (void)show;
|
||||
|
||||
/**
|
||||
Hide the dialog.
|
||||
*/
|
||||
- (void)hide;
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user