Updated: October 28, 2024 |
The PiPS Client API allows applications to obtain a list of providers that have been registered with the framework. Applications can then initialize the providers they want to use and begin exchanging data with other endpoints connected to the same encapsulated services.
int i ; pips_provider_t* provider ; const char* const* registered_providers ; int num_providers = pips_get_registered_providers( ®istered_providers ) ; for ( i = 0 ; i < num_providers ; ++i ) { /* Initialize the i-th provider. */ pips_provider_t* provider = pips_get_provider( registered_providers[ i ] ) ; pips_init_provider( provider, NULL, NULL ) ; } /* Get the default provider. */ provider = pips_get_provider( NULL ) ;
This strategy is useful when you want to initialize all providers so you can use any of them later but start using the default provider right away. You would likely put this code near the beginning of your program, in the setup section.