Please follow below steps to request list of available modem profiles
1. Get the DataFactory and DataProfileManager instances
auto &dataFactory = DataFactory::getInstance();
auto dataProfileMgr = dataFactory.getDataProfileManager();
2. Instantiate requestProfileList callback
auto dataProfileListCb_ = std::make_shared<DataProfileListCallback>();
2.1 Implement IDataProfileListCallback interface to know status of requestProfileList
class DataProfileListCallback : public telux::common::IDataProfileListCallback {
virtual void onProfileListResponse(const std::vector<std::shared_ptr<DataProfile>> &profiles,
telux::common::ErrorCode error) override {
std::cout<<"Length of available profiles are "<<profiles.size()<<std::endl;
}
};
3. Send a requestProfileList along with required callback function
telux::common::Status status = dataProfileMgr->requestProfileList(dataProfileListCb_);
4. Receive DataProfileListCallback responses for requestProfileList request