Symbian:change a ringtone programatically in profile

博客围绕Series60平台配置文件编辑展开,提到在Series60 1.0版本可行,但N6600或S60 Platform 2.0不行。还指出在6630手机的特定目录找到配置文件,部分解析了文件格式,不过对校验和构建及错误情况存疑。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 Huh
1  byte profile number
4  bytes Huh
1  byte (n :=) profile name length
2n bytes profile name
1  byte Huh
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 Huh
1  byte (n :=) ringtone 2 path length
2n bytes ringtone 2 path
1  byte Huh
1  byte (n :=) message alert tone path length
2n bytes message alert tone path
1  byte
1  byte ringing type
3  bytes Huh
1  byte keypad tones
4  bytes Huh
1  byte Vibrating alert
1  byte warning tones
1  byte (n :=) chat alert tone path length
2n bytes chat alert tone path
1  Huh
1  byte (n :=) chat alert tone path length
2n bytes chat alert tone path
9  bytes Huh
4  bytes checksum (probably)

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值