On 24 Mar 2014, at 10:01 pm, Drasko DRASKOVIC <drasko.drasko...@gmail.com> wrote:
> Hi all, > I have a question about libconnman-qt. What is a procedure for WiFi > connection - i.e. what functions have to be called and in which order? > > From what I see, we have to create one UserAgent object, and call > requestUserInput(). Do we have to call requestConnect(const > QDBusMessage &msg) first? > And what is QDBusMessage &msg that we have to pass to this function? > > Best regards, > Drasko > Hi Drasko, UserAgent::requestUserInput will get emitted by connman after a service requestConnect gets called, if/when it needs user input. The second argument of requestUserIput signal contains a QVariantMap of the fields it needs. So here's the procedure: wifiService->requestConnect(); // connman/libconnman-qt will emit requestUserInput from UserAgent class if input is needed You then send the filled in fields in the QVariantMap with UserAgent::sendUserReply Be aware that on connman 1.15 and earlier, only one UserAgent can be registered on a system at a time. In Sailfish, until we can update to latest connman (which will happen soon), that one UserAgent is connectionagent, which API is available through the connectionagent qml plugin Lorn Potter QtSensors/ Connectivity llornkcor technologies / Jolla Mobile