Mir
mir_prompt_session.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License version 2 or 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef MIR_TOOLKIT_MIR_PROMPT_SESSION_H_
18 #define MIR_TOOLKIT_MIR_PROMPT_SESSION_H_
19 
21 
22 #include <sys/types.h>
23 #include <stdbool.h>
24 
25 #ifdef __cplusplus
26 
30 extern "C" {
31 #endif
32 
42  MirConnection* connection,
43  pid_t application_pid,
44  MirPromptSessionStateChangeCallback state_change_callback,
45  void *context);
46 
62  MirPromptSession *prompt_session,
63  unsigned int no_of_fds,
64  MirClientFdCallback callback,
65  void * context);
66 
81  MirPromptSession *prompt_session,
82  unsigned int no_of_fds,
83  int* fds);
89 
95 bool mir_prompt_session_is_valid(MirPromptSession *prompt_session);
96 
105 char const *mir_prompt_session_error_message(MirPromptSession *prompt_session);
106 
107 #ifdef __cplusplus
108 }
110 #endif
111 
112 #endif /* MIR_TOOLKIT_MIR_PROMPT_SESSION_H_ */
struct MirPromptSession MirPromptSession
Definition: client_types.h:48
struct MirWaitHandle MirWaitHandle
Returned by asynchronous functions.
Definition: client_types.h:79
struct MirConnection MirConnection
Definition: client_types.h:41
bool mir_prompt_session_is_valid(MirPromptSession *prompt_session)
Test for a valid prompt session.
char const * mir_prompt_session_error_message(MirPromptSession *prompt_session)
Retrieve a text description of the last error.
size_t mir_prompt_session_new_fds_for_prompt_providers_sync(MirPromptSession *prompt_session, unsigned int no_of_fds, int *fds)
Allocate some FDs for prompt providers to connect on.
void(* MirPromptSessionStateChangeCallback)(MirPromptSession *prompt_provider, MirPromptSessionState state, void *context)
Callback member of MirPromptSession for handling of prompt sessions events.
Definition: client_types.h:463
void(* MirClientFdCallback)(MirPromptSession *prompt_session, size_t count, int const *fds, void *context)
Callback called when a request for client file descriptors completes.
Definition: client_types.h:169
MirPromptSession * mir_connection_create_prompt_session_sync(MirConnection *connection, pid_t application_pid, MirPromptSessionStateChangeCallback state_change_callback, void *context)
Create and start a new prompt session.
MirWaitHandle * mir_prompt_session_new_fds_for_prompt_providers(MirPromptSession *prompt_session, unsigned int no_of_fds, MirClientFdCallback callback, void *context)
Allocate some FDs for prompt providers to connect on.
void mir_prompt_session_release_sync(MirPromptSession *prompt_session)
Stop and release the specified prompt session.

Copyright © 2012-2018 Canonical Ltd.
Generated on Mon Feb 19 14:06:43 UTC 2018