summaryrefslogtreecommitdiff
path: root/client/agent.c
AgeCommit message (Collapse)AuthorFilesLines
2014-07-17Imported Upstream version 1.24upstream/1.24Zhang zhengguang1-36/+43
2013-06-13client: Fix passphrase handlingPatrik Flykt1-2/+10
An empty passphrase means that WPS is to be tried next. If WPS is not supported by the service, passphrase can not be left empty.
2013-06-13client: Implement VPN Agent API RequestInput method callPatrik Flykt1-54/+77
Instead of having a global agent_input struct, make the structure a member of the agent_data structure that gets passed around when handling the RequestInput method call. With this modification agent_data is self-contained with all needed information and the RequestInput handling code can be shared between ConnMan and VPN agent implementations.
2013-06-13client: Implement support for queueing Agent messagesPatrik Flykt1-9/+60
ConnMan and ConnMan VPN daemon both send only one Agent message at a time. Since they are two different daemons, they can be sending messages at the same time independent of each other. Implement a check for an agent request from the other daemon being already processed and if so store the message for later. When the current agent request has been processed, check if there are pending requests from the other daemon and re-run the pending function. In order to support arbitrary queueing, make all method call implementations asynchronous.
2013-06-13client: Add VPN Agent support for Release, Cancel and ReportErrorPatrik Flykt1-0/+116
Create a new agent data structure for the VPN Agent and add the needed minor modifications to Release, Cancel and ReportError method calls in order to get them working both for Agent and VPN Agent. Create new register and unregister functions for the VPN Agent code.
2013-06-13client: Create agent data structure and pass it in function callbacksPatrik Flykt1-65/+99
Collect the agent variables into a data structure and update the agent functionality to pass this data structure around as function callback user data. Update the agent mode input functionality to store both the callback function and user data pointers. Notice that only only one input callback can be handled at any one time due to the input handling itself and the simple storing of callback and user data pointers.
2013-06-07client: Avoid printing extra prompt on RequestInputPatrik Flykt1-1/+2
2013-06-07client: Read D-Bus string type only if argument is 'Type'Patrik Flykt1-3/+4
A basic type was always read independent of the argument type which on some systems lead to a crash and on others only to a warning printout.
2013-06-07client: Add parameter to specify D-Bus service for method callPatrik Flykt1-4/+4
2013-05-08Fix gcc compiler warning with -Wformat-security.Justin Maggard1-1/+1
Cosmetic fix.
2013-05-06client: Fixes for handling Agent messagesPatrik Flykt1-8/+12
Properly handle agent confirmation input, unset the prompt when RequestInput processing ends and set the passphrase only if it contains some text.
2013-05-03client: Initial RequestInput handling supportPatrik Flykt1-0/+199
When receiving a RequestInput Agent API D-Bus call, ask the input in a somewhat logical order from the user with user names first and passwords next. If a passphrase is entered, ignore any WPS pin code requests. Prepare for passphrase length checking by going through the RequestInput message to get the 'Type' argument.
2013-05-03client: Add ReportError handlingPatrik Flykt1-0/+49
Report error and wait for the user to reply with yes/no.
2013-05-03client: Add RequestBrowser handlingPatrik Flykt1-1/+87
Print out the RequestBrowser URL and wait for user input to proced. Add a helper function for getting a yes/no confirmation from the user and another one for getting the last part of the service object path.
2013-05-03client: Implement Agent Release and Cancel method callsPatrik Flykt1-0/+50
Unref the saved Agent D-Bus message on Release and Cancel. In response to the Release method call unnregister Agent interface and quit if in non-interactive mode.
2013-05-03client: Add support for registering and unregistering an agentPatrik Flykt1-0/+141
Add agent .h and .c files containing registering and unregistering functionality.