~phablet-team/aethercast/fix-for-microsoft-dongle

« back to all changes in this revision

Viewing changes to src/mcs/miracastservice.cpp

  • Committer: Tarmac
  • Author(s): Simon Fels
  • Date: 2016-03-04 14:14:09 UTC
  • mfrom: (119.4.12 ac-networking-fixes)
  • Revision ID: tarmac-20160304141409-xe8khdgb43nha1fn
Multiple changes for Networking support:

* Add a DisconnectAll dbus method to allow the UI to easily disconnect
  any connected device. Just for the purpose of a demo.
* Return proper errors when scanning fails.
* Enable miracast mode for the WiFi driver if available.
* Set GO intent by default to 7. Should be higher if we're a sink.
* Print frequencies consider for GO negotiation
* Several minor fixes
* Enable unit tests again.

Approved by PS Jenkins bot, Thomas Voß.

Show diffs side-by-side

added added

removed removed

Lines of Context:
377
377
    callback(Error::kNone);
378
378
}
379
379
 
380
 
void MiracastService::Scan(const std::chrono::seconds &timeout) {
 
380
void MiracastService::DisconnectAll(ResultCallback callback) {
 
381
    Disconnect(current_device_, callback);
 
382
}
 
383
 
 
384
mcs::Error MiracastService::Scan(const std::chrono::seconds &timeout) {
 
385
    if (current_device_)
 
386
        return mcs::Error::kNoDeviceConnected;
 
387
 
381
388
    network_manager_->Scan(timeout);
 
389
 
 
390
    return mcs::Error::kNone;
382
391
}
383
392
 
384
393
void MiracastService::Shutdown() {