solid
play

Solid Int egration avec le mat eriel sans utiliser daspirine K - PowerPoint PPT Presentation

Plan Motivations Architecture Utiliser lAPI Solid Int egration avec le mat eriel sans utiliser daspirine K evin Ottens 26 Janvier 2008 K evin Ottens Solid 1/17 Plan Motivations Architecture Utiliser lAPI Plan 1


  1. Plan Motivations Architecture Utiliser l’API Solid Int´ egration avec le mat´ eriel sans utiliser d’aspirine K´ evin Ottens 26 Janvier 2008 K´ evin Ottens — Solid 1/17

  2. Plan Motivations Architecture Utiliser l’API Plan 1 Motivations 2 Architecture 3 Utiliser l’API K´ evin Ottens — Solid 2/17

  3. Plan Motivations Architecture Utiliser l’API Plan 1 Motivations 2 Architecture 3 Utiliser l’API K´ evin Ottens — Solid 3/17

  4. Plan Motivations Architecture Utiliser l’API Am´ eliorer le support mat´ eriel Ce qui est disponible pour KDE3 D´ etection du mat´ eriel: mediamanager, medianotifier... Gestion r´ eseau: knetworkmanager, kwifimanager... Gestion de l’´ energie: kpowersave, sebas’ powermanager... Pourquoi est-ce nocif? Couvre uniquement un sous ensemble des fonctionnalit´ es Informations difficilement accessibles aux autres applications Li´ e ` a un syst` eme particulier K´ evin Ottens — Solid 4/17

  5. Plan Motivations Architecture Utiliser l’API Permettre les am´ eliorations Nouvelles utilisations ”P´ eriph´ eriques nomades” Bluetooth d´ ej` a pr´ esent Collaboration Mat´ eriel/Logiciel Nouvelles plateformes Windows Mac OS X *BSD (le support de KDE3 n’´ etait pas parfait) K´ evin Ottens — Solid 5/17

  6. Plan Motivations Architecture Utiliser l’API Vision globale Plusieurs domaines D´ etection du mat´ eriel, gestion du r´ eseau et de l’´ energie Chaque domaine correspond ` a un ensemble de classes Chaque domaine aura au moins un ”policy agent” Policy agents, kezako? Ils sont d´ ej` a parmi nous: knetworkmanager, mediamanager... Responsables de: l’interaction avec l’utilisateur d’appliquer ses r´ eglages K´ evin Ottens — Solid 6/17

  7. Plan Motivations Architecture Utiliser l’API Solid Un environnement robuste Fiche d’identit´ e Leader : hum... oui ok... j’avoue But : Am´ eliorer l’interaction entre le mat´ eriel et les applications du bureau D´ etails techniques Architecture ` a backends ”Fake backend” pour l’´ ecriture de tests unitaires Plusieurs domaines D´ ecouverte du mat´ eriel Gestion du r´ eseau Gestion de l’´ energie API de haut niveau : faciliter la vie des d´ eveloppeurs K´ evin Ottens — Solid 7/17

  8. Plan Motivations Architecture Utiliser l’API Plan 1 Motivations 2 Architecture 3 Utiliser l’API K´ evin Ottens — Solid 8/17

  9. Plan Motivations Architecture Utiliser l’API S´ eparation Frontend/Backend Frontend Object + Object() calls + doSomething() Factory calls + createObject() creates Object + doSomething() Backend Principe Compabilit´ e binaire assur´ ee dans le frontend Chaque objet du frontend pointe sur un objet du backend Une ”factory” est utilis´ ee pour cr´ eer les objets du backend K´ evin Ottens — Solid 9/17

  10. Plan Motivations Architecture Utiliser l’API Portabilit´ e utilise Application Frontend utilise implémente implémente Interfaces internes implémente Backend Windows Backend HAL Backend Mac utilise HAL K´ evin Ottens — Solid 10/17

  11. Plan Motivations Architecture Utiliser l’API Satisfaire tous les besoins libsolid (kdelibs) Couvre les besoins de 90% des applications D´ etection du mat´ eriel Tˆ aches simples pour la gestion du r´ eseau et de l’´ energie libsolidcontrol (kdebase) Couvre les besoins des 10% d’applications restantes API plus complexe et sp´ ecialis´ ee Cible les applications faisant partie de la plateforme Couvre la gestion du r´ eseau et de l’´ energie Couvre le bluetooth K´ evin Ottens — Solid 11/17

  12. Plan Motivations Architecture Utiliser l’API Plan 1 Motivations 2 Architecture 3 Utiliser l’API K´ evin Ottens — Solid 12/17

  13. Plan Motivations Architecture Utiliser l’API D´ ecouverte du mat´ eriel (1/3) Qu’est-ce qu’il y a de bon l` a dedans? DeviceManager Device Capability Processor Button Block AudioIface ... Storage Volume K´ evin Ottens — Solid 13/17

  14. Plan Motivations Architecture Utiliser l’API D´ ecouverte du mat´ eriel (2/3) Qu’est-ce qu’il y a de bon l` a dedans? Principes Le syst` eme a des Device s, chacun ayant un identifiant unique Les Device s sont organis´ es dans une hi´ erarchie Chaque Device a des interfaces de diff´ erents type L’ensemble des DeviceInterface s d’un Device d´ ecrit ce dont il est capable Notifications Solid::DeviceNotifier::deviceAdded(QString) Solid::DeviceNotifier::deviceRemoved(QString) K´ evin Ottens — Solid 14/17

  15. Plan Motivations Architecture Utiliser l’API D´ ecouverte du mat´ eriel (2/3) Qu’est-ce qu’il y a de bon l` a dedans? Trouver des devices Solid::Device::allDevices() Solid::Device::devicesFromType() Solid::Device::devicesFromQuery() QList<Solid::Device> all = Solid::Device::allDevices(); K´ evin Ottens — Solid 15/17

  16. Plan Motivations Architecture Utiliser l’API D´ ecouverte du mat´ eriel (2/3) Qu’est-ce qu’il y a de bon l` a dedans? Trouver des devices Solid::Device::allDevices() Solid::Device::devicesFromType() Solid::Device::devicesFromQuery() QList<Solid::Device> processors = Solid::Device::listFromType( Solid::DeviceInterface::Processor); K´ evin Ottens — Solid 15/17

  17. Plan Motivations Architecture Utiliser l’API D´ ecouverte du mat´ eriel (2/3) Qu’est-ce qu’il y a de bon l` a dedans? Trouver des devices Solid::Device::allDevices() Solid::Device::devicesFromType() Solid::Device::devicesFromQuery() QList<Solid::Device> usbDrives = Solid::Device::listFromQuery( "StorageDrive.bus == ’Usb’"); K´ evin Ottens — Solid 15/17

  18. Plan Motivations Architecture Utiliser l’API D´ ecouverte du mat´ eriel (2/3) Qu’est-ce qu’il y a de bon l` a dedans? Trouver des devices Solid::Device::allDevices() Solid::Device::devicesFromType() Solid::Device::devicesFromQuery() Manipuler des devices Solid::Device::is<T>() Solid::Device::as<T>() Solid::Device dev = ... if (dev.is<Solid::Processor>()) { ... K´ evin Ottens — Solid 15/17

  19. Plan Motivations Architecture Utiliser l’API D´ ecouverte du mat´ eriel (2/3) Qu’est-ce qu’il y a de bon l` a dedans? Trouver des devices Solid::Device::allDevices() Solid::Device::devicesFromType() Solid::Device::devicesFromQuery() Manipuler des devices Solid::Device::is<T>() Solid::Device::as<T>() Solid::Device dev = ... if (dev.is<Solid::Camera>()) { QVariant handle = dev.as<Solid::Camera>()->driverHandle(); ... K´ evin Ottens — Solid 15/17

  20. Plan Motivations Architecture Utiliser l’API D´ ecouverte du mat´ eriel (2/3) Qu’est-ce qu’il y a de bon l` a dedans? Trouver des devices Solid::Device::allDevices() Solid::Device::devicesFromType() Solid::Device::devicesFromQuery() Manipuler des devices Solid::Device::is<T>() Solid::Device::as<T>() Demo, ”storage-plug” (94 lignes) K´ evin Ottens — Solid 15/17

  21. Plan Motivations Architecture Utiliser l’API R´ eseau et Energie Arbre et Fatigue Solid::Networking status() / statusChanged() shouldConnect() / shouldDisconnect() Solid::Powermanagement appShouldConserveResources() requestSleep() begin/stopSuppressSleep() K´ evin Ottens — Solid 16/17

  22. Plan Motivations Architecture Utiliser l’API R´ eseau et Energie Arbre et Fatigue Solid::Networking status() / statusChanged() shouldConnect() / shouldDisconnect() Solid::Powermanagement appShouldConserveResources() requestSleep() begin/stopSuppressSleep() K´ evin Ottens — Solid 16/17

  23. Plan Motivations Architecture Utiliser l’API R´ eseau et Energie Arbre et Fatigue Solid::Networking status() / statusChanged() shouldConnect() / shouldDisconnect() Solid::Powermanagement appShouldConserveResources() requestSleep() begin/stopSuppressSleep() K´ evin Ottens — Solid 16/17

  24. Plan Motivations Architecture Utiliser l’API R´ eseau et Energie Arbre et Fatigue Solid::Networking status() / statusChanged() shouldConnect() / shouldDisconnect() Solid::Powermanagement appShouldConserveResources() requestSleep() begin/stopSuppressSleep() K´ evin Ottens — Solid 16/17

  25. Plan Motivations Architecture Utiliser l’API R´ eseau et Energie Arbre et Fatigue Solid::Networking status() / statusChanged() shouldConnect() / shouldDisconnect() Solid::Powermanagement appShouldConserveResources() requestSleep() begin/stopSuppressSleep() K´ evin Ottens — Solid 16/17

  26. Plan Motivations Architecture Utiliser l’API Questions ? K´ evin Ottens ervin@kde.org K´ evin Ottens — Solid 17/17

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend