/// // Select the Access Point ////////////////
// Header file
# Include "commdb. H"
# Include "cdbcols. H"
# Include "apselect. H"
// Database
// Apengine, commdb
//Code
Ccommsdatabase * commdb = ccommsdatabase: newl (edatabasetypeiap );
Capselect * apselect = capselect: newlc (* commdb, eapisptypeall, eapbearertypeall, keapsortuidascending); // the ISP and bearer types and sorting rules are specified.
If (apselect-> movetofirst ()){
Do {
Tptrc A = apselect-> name (); // Access Point name
Tuint uid = apselect-> UID ();
// Save the Access Point name and ID
}
While (apselect-> movenext (); // The next record
}
/// // Ini read/write ////////////////////
// Header file
# Include "s32file. H"
# Include "bautils. H"
// Database
// Bafl,
// Note: your_id is a custom unsigned integer, default, and value is of the tint type.
// Read
Cdictionaryfilestore * DFS = cdictionaryfilestore: openlc (ceikonenv: static ()-> fssession (), file path, tuid: UID (your_id ));
Rdictionaryreadstream reader;
If (DFS-> ispresentl (tuid: UID (ID ))){
Reader. openlc (* DFS, tuid: UID (ID ));
Default = reader. readint32l ();
Cleanupstack: popanddestroy ();
}
Cleanupstack: popanddestroy ();
// Write
Cdictionaryfilestore * DFS = cdictionaryfilestore: openlc (ceikonenv: static ()-> fssession (), file path, tuid: UID (your_id ));
Rdictionarywritestream writer;
Writer. assignlc (* DFS, tuid: UID (ID ));
Writer. writeint32l (value );
Writer. commitl ();
Cleanupstack: popanddestroy ();
DFS-> commitl ();
Cleanupstack: popanddestroy ();