Skip to content

Creating a new application

vplachkov edited this page Aug 9, 2012 · 6 revisions

iviLink::CApp class provides iviLink functionality for applications. It allows developers to register application in iviLink and use functionality of provided services. To use iviLink in your application, please, do the next simple steps:

  1. Inherit iviLink::CApp class
  2. Instantiate class by passing constructor UIDs of supported services. (App can dynamically change list of supported services by calling setEnabled() function)
  3. Register profile callbacks by calling registerProfileCallbacks(serviceUid, profileApiUid) function
  4. To load and unload services use load()/unload() functions by passing UID of needed service.
  5. Define in your class virtual functions from iviLink::CApp class to react on events

To use profiles functionality instantiate profile proxy object by passing constructor service UID. This objects has interface similar to profile API. If service is active calling of profile proxy functions will call corresponding functions in instance of profile in this service. If profiles state is not correct, calling of Profile Proxy functions will not have any effect, but getError() function return error.