Page tree
Skip to end of metadata
Go to start of metadata

Using publicly published interfaces can save development time by utilising functionality already provided by other components. Additionally it offers an integrated, consistent experience for your users. For instance, users are already used to managing their logging information in a particular way so by using the Qbik Logging API your logging can remain consistent with the rest of the system.

When you link with the WinGate SDK your module will automatically be linked with all Qbik public interfaces as they are published by their respective components. You obviously cannot use these interfaces until they are published so the Notify mechanism is present to allow you to receive a message when a new interface is registered and able to be used. The sequence typically goes as follows:

 

  1. A dependency component registers an Interface with RegisterInterface
  2. The framework calls the Notify callback for your component previously registered with RegisterComponent
  3. In the Notify callback, you act on notification of this interface

Postponing your interface initialisation

The Notify callback in conjunction with the QueryInitInterfaces callback can work as a way to hold off initialisation of your own interfaces. To do this, have your QueryInitInterfaces callback return false until all dependent interfaces have been registered. e.g.

 

 

In the above example, once the host comms and persistence provider interfaces have been registered, your component will return true from QueryInitInterfaces and the framework then knows it can safely call your InitInterfaces callback.

See Also

ComponentEntry

 

  • No labels