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 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  mir_prompt_session_state_change_callback state_change_callback,
45  void *context);
46 
62  MirPromptSession *prompt_session,
63  unsigned int no_of_fds,
64  mir_client_fd_callback callback,
65  void * context);
66 
72 
78 bool mir_prompt_session_is_valid(MirPromptSession *prompt_session);
79 
88 char const *mir_prompt_session_error_message(MirPromptSession *prompt_session);
89 
90 #ifdef __cplusplus
91 }
93 #endif
94 
95 #endif /* MIR_TOOLKIT_MIR_PROMPT_SESSION_H_ */
Definition: mir_wait_handle.h:31
MirPromptSession * mir_connection_create_prompt_session_sync(MirConnection *connection, pid_t application_pid, mir_prompt_session_state_change_callback state_change_callback, void *context)
Create and start a new prompt session.
Definition: mir_prompt_session_api.cpp:35
void(* mir_client_fd_callback)(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:120
MirWaitHandle * mir_prompt_session_new_fds_for_prompt_providers(MirPromptSession *prompt_session, unsigned int no_of_fds, mir_client_fd_callback callback, void *context)
Allocate some FDs for prompt providers to connect on.
Definition: mir_prompt_session_api.cpp:60
bool mir_prompt_session_is_valid(MirPromptSession *prompt_session)
Test for a valid prompt session.
Definition: mir_prompt_session_api.cpp:86
char const * mir_prompt_session_error_message(MirPromptSession *prompt_session)
Retrieve a text description of the last error.
Definition: mir_prompt_session_api.cpp:93
Definition: mir_prompt_session.h:40
Definition: mir_connection.h:79
void mir_prompt_session_release_sync(MirPromptSession *prompt_session)
Stop and release the specified prompt session.
Definition: mir_prompt_session_api.cpp:79
void(* mir_prompt_session_state_change_callback)(MirPromptSession *prompt_provider, MirPromptSessionState state, void *context)
Callback member of MirPromptSession for handling of prompt sessions events.
Definition: client_types.h:340

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015