VLCKit

VLCDialogProvider.h
1 /*****************************************************************************
2 * VLCDialogProvider.h: an implementation of the libvlc dialog API
3 *****************************************************************************
4 * Copyright (C) 2016 VideoLabs SAS
5 * $Id$
6 *
7 * Authors: Felix Paul Kühne <fkuehne # videolan.org>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU Lesser General Public License as published by
11 * the Free Software Foundation; either version 2.1 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this program; if not, write to the Free Software Foundation,
21 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
23
24 @class VLCLibrary;
25
26 typedef NS_ENUM(NSUInteger, VLCDialogQuestionType) {
27 VLCDialogQuestionNormal,
28 VLCDialogQuestionWarning,
29 VLCDialogQuestionCritical,
30 };
31
35 @protocol VLCCustomDialogRendererProtocol <NSObject>
36
42 - (void)showErrorWithTitle:(NSString * _Nonnull)error
43 message:(NSString * _Nonnull)message;
44
54 - (void)showLoginWithTitle:(NSString * _Nonnull)title
55 message:(NSString * _Nonnull)message
56 defaultUsername:(NSString * _Nullable)username
57 askingForStorage:(BOOL)askingForStorage
58 withReference:(NSValue * _Nonnull)reference;
59
70 - (void)showQuestionWithTitle:(NSString * _Nonnull)title
71 message:(NSString * _Nonnull)message
72 type:(VLCDialogQuestionType)questionType
73 cancelString:(NSString * _Nullable)cancelString
74 action1String:(NSString * _Nullable)action1String
75 action2String:(NSString * _Nullable)action2String
76 withReference:(NSValue * _Nonnull)reference;
77
87 - (void)showProgressWithTitle:(NSString * _Nonnull)title
88 message:(NSString * _Nonnull)message
89 isIndeterminate:(BOOL)isIndeterminate
90 position:(float)position
91 cancelString:(NSString * _Nullable)cancelString
92 withReference:(NSValue * _Nonnull)reference;
93
99 - (void)updateProgressWithReference:(NSValue * _Nonnull)reference
100 message:(NSString * _Nullable)message
101 position:(float)position;
102
106 - (void)cancelDialogWithReference:(NSValue * _Nonnull)reference;
107
108 @end
109
110
115 @interface VLCDialogProvider : NSObject
116
125 - (instancetype _Nullable)initWithLibrary:(VLCLibrary * _Nullable)library
126 customUI:(BOOL)customUI;
127
133 @property (weak, readwrite, nonatomic, nullable) id<VLCCustomDialogRendererProtocol> customRenderer;
134
142 - (void)postUsername:(NSString * _Nonnull)username
143 andPassword:(NSString * _Nonnull)password
144 forDialogReference:(NSValue * _Nonnull)dialogReference
145 store:(BOOL)store;
146
152 - (void)postAction:(int)buttonNumber
153 forDialogReference:(NSValue * _Nonnull)dialogReference;
154
159 - (void)dismissDialogWithReference:(NSValue * _Nonnull)dialogReference;
160
161 @end
VLCCustomDialogRendererProtocol-p
Definition: VLCDialogProvider.h:35
VLCDialogProvider
Definition: VLCDialogProvider.h:116
VLCLibrary
Definition: VLCLibrary.h:47
VLCDialogProvider::customRenderer
id< VLCCustomDialogRendererProtocol > customRenderer
Definition: VLCDialogProvider.h:133