meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

peerhood:procedure_of_gathering_neighborhood_information [2011/09/02 12:05] (current)
Line 1: Line 1:
 +This part of the manual concentrates to the procedure how information concerning the neighborhood is collected.
 +
 +=Algorithm for Bluetooth plugin=
 +This algorithm is for the Bluetooth plugin
 +
 +Daemon: ​
 +<​code>​
 +StartPlugins() {
 +   // Start method starts the plugin based inquiry process to find other devices and services
 +   ​plugin(i)->​Start() {
 +      InquiryThread () {
 +         // Here we need to have the logic how often we do inquiries
 +         //​What if we move this task to some other device that only informs us?
 +         ​hci_inquiry(...)
 +
 +         // All devices found are handled somehow
 +         for all found devices {
 +            // Bad name for the method, better would be CheckDevice
 +            AddDevice() {
 +               If existing device {
 +                  // Here we could consider if certain services are not needed to be checked
 +                  // Or if we just check the services when necessary (not peerhood type of operation)
 +                  HasPeerHood() for updated devices ​
 +               }
 +              ​
 +               ​HasPeerHood() for new devices {
 +                  sdp_service_search()
 +               }
 +               // This is a point of possibilities. At this moment we should exchange what we need
 +               // All protos supported by this device could be added here
 +               if peerhood capable {
 +                  FetchInformation() {
 +                     ​connect and receive services according to the selections made in phconfig
 +                  }
 +               }
 +            }
 +         }
 +
 +         ​if(MakeOlder()) {
 +            DeviceStorage->​Update()
 +         }
 +      }
 +   }
 +
 +   // Advert method starts a plugin based answering process for service inquiries
 +   ​plugin(i)->​Advert() {
 +      Set sdp record
 +      AdvertThread {
 +
 +      }
 +   }
 +}
 +</​code>​
 +