1/*
2 * Copyright (c) 2001-2013 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24/*
25 * Modification History
26 *
27 * November 8, 2001	Dieter Siegmund
28 * - created
29 */
30
31#ifndef _S_DIALOGUE_H
32#define _S_DIALOGUE_H
33
34#include <sys/types.h>
35#include <CoreFoundation/CFString.h>
36#include <Security/SecIdentity.h>
37
38/**
39 ** CredentialsDialogue
40 **/
41typedef struct {
42    CFStringRef		username;
43    CFStringRef		password;
44    CFStringRef		new_password;
45    Boolean		user_cancelled;
46    Boolean		remember_information;
47    SecIdentityRef	chosen_identity;
48} CredentialsDialogueResponse, *CredentialsDialogueResponseRef;
49
50typedef void
51(*CredentialsDialogueResponseCallBack)(const void * arg1,
52				       const void * arg2,
53				       CredentialsDialogueResponseRef data);
54
55typedef struct CredentialsDialogue_s CredentialsDialogue,
56    *CredentialsDialogueRef;
57
58extern const CFStringRef	kCredentialsDialogueSSID;
59extern const CFStringRef	kCredentialsDialogueAccountName;
60extern const CFStringRef	kCredentialsDialoguePassword;
61extern const CFStringRef	kCredentialsDialogueCertificates;
62extern const CFStringRef	kCredentialsDialogueRememberInformation;
63extern const CFStringRef	kCredentialsDialoguePasswordChangeRequired;
64
65CredentialsDialogueRef
66CredentialsDialogue_create(CredentialsDialogueResponseCallBack func,
67			   const void * arg1, const void * arg2,
68			   CFDictionaryRef details);
69void
70CredentialsDialogue_free(CredentialsDialogueRef * dialogue_p_p);
71
72/**
73 ** TrustDialogue
74 **/
75typedef struct {
76    Boolean		proceed;
77} TrustDialogueResponse, *TrustDialogueResponseRef;
78
79typedef void
80(*TrustDialogueResponseCallBack)(const void * arg1,
81				 const void * arg2,
82				 TrustDialogueResponseRef data);
83
84typedef struct TrustDialogue_s TrustDialogue, *TrustDialogueRef;
85
86TrustDialogueRef
87TrustDialogue_create(TrustDialogueResponseCallBack func,
88		     const void * arg1, const void * arg2,
89		     CFDictionaryRef trust_info,
90		     CFTypeRef ssid);
91
92CFDictionaryRef
93TrustDialogue_trust_info(TrustDialogueRef dialogue);
94
95void
96TrustDialogue_free(TrustDialogueRef * dialogue_p_p);
97
98/**
99 ** AlertDialogue
100 **/
101
102typedef void
103(*AlertDialogueResponseCallBack)(const void * arg1,
104				 const void * arg2);
105
106typedef struct AlertDialogue_s AlertDialogue, *AlertDialogueRef;
107
108AlertDialogueRef
109AlertDialogue_create(AlertDialogueResponseCallBack func,
110		     const void * arg1, const void * arg2,
111		     CFStringRef message, CFStringRef ssid);
112void
113AlertDialogue_free(AlertDialogueRef * dialogue_p_p);
114
115
116#endif /* _S_DIALOGUE_H */
117