http://forum.newlc.com/index.php/topic,229.15.html
Include <profileApi.h> and link with ProfileEngine.lib
Code:
_LIT(KProfileDatabase,"c:\\system\\Apps\\profileApp\\dbProfile.db");
_LIT(KGeneral,"PRS0");
_LIT(KRingtone,"c:\\system\\data\\profiles\\ring.mid")
CPermanentFileStore* fstore = CPermanentFileStore::OpenLC(CEikonEnv::Static()->FsSession(),KProfileDatabase,EFileRead|EFileWrite);
RDbStoreDatabase database;
database.OpenL(fstore,fstore->Root());
RDbTable table;
table.Open(database, KGeneral);
table.FirstL();
table.UpdateL();
TDbColType colType = table.ColType(5);
if ((!table.IsColNull(5)) && (colType == EDbColLongText))
{
RDbColWriteStream writeStream;
writeStream.OpenL(table, 5);
writeStream.WriteL(KRingtone());
writeStream.Close();
table.PutL();
}
table.Close();
database.Close();
store->CommitL();
CleanupStack::PopAndDestroy(store);
this will only work with Series60 platform 1.0 it doesn't work with N6600 or S60 Platform 2.0 Phones
I'm trying to edit the profiles in a series 60 >1.0 too, and I found them in seperate files (for every profile) in the C:\System\Data\Profiles directory of my 6630. I decoded the format partly (see below), I have no idea how the checksum should be constructed though, and what happens if it's not correct. Who can help me?
4 bytes adress or something ...
4 bytes adress or something ...
2 bytes
1 byte profile number
4 bytes
1 byte (n :=) profile name length
2n bytes profile name
1 byte
1 byte (n :=) number of groups to accept incoming call from
4n bytes group related
1 byte (n :=) ringtone path length
2n bytes ringtone path
1 byte
1 byte (n :=) ringtone 2 path length
2n bytes ringtone 2 path
1 byte
1 byte (n :=) message alert tone path length
2n bytes message alert tone path
1 byte
1 byte ringing type
3 bytes
1 byte keypad tones
4 bytes
1 byte Vibrating alert
1 byte warning tones
1 byte (n :=) chat alert tone path length
2n bytes chat alert tone path
1
1 byte (n :=) chat alert tone path length
2n bytes chat alert tone path
9 bytes
4 bytes checksum (probably)