开发学院手机开发Symbian 开发 symbian 来电铃声及情景模式设置 阅读

symbian 来电铃声及情景模式设置

 2010-08-11 12:19:00 来源:WEB开发网   
核心提示:TInt mode = -1;repository->Get(0x7e000001, mode);TInt k = mode << 24 | 0x0a;TInt ret = KErrNone;ret = repository->Set(k, bOpen);delete repository;re

TInt mode = -1;

repository->Get(0x7e000001, mode);

TInt k = mode << 24 | 0x0a;

TInt ret = KErrNone;

ret = repository->Set(k, bOpen);

delete repository;

repository = NULL;

//重起情景模式。

MProfileEngine* profileEngine = CreateProfileEngineL();

CleanupReleasePushL(*profileEngine);

profileEngine->SetActiveProfileL(profileEngine->ActiveProfileId());

CleanupStack::PopAndDestroy(1);

if (ret == KErrNone)

{

return TRUE;

}

else

{

return FALSE;

}

}

TBool CRingManager::GetLibrateRing()

{

const TUid KUidSound =

{

0x101f8798

};

CRepository* repository = CRepository::NewL(KUidSound);

TInt mode = -1;

repository->Get(0x7e000001, mode);

TInt k = mode << 24 | 0x0a;

TBool bLibrate=false;

repository->Get(k,bLibrate);

delete repository;

repository = NULL;

return bLibrate;

}

//=============================================================================

//设置音量大小( aVolume(0,10))

TBool CRingManager::SetRingVolume(TInt aVolume)

{

if (aVolume < 1)

aVolume = 1;

if (aVolume > 10)

aVolume = 10;

const TUid KUidSound =

{

0x101f8798

};

CRepository* repository = CRepository::NewL(KUidSound);

TInt mode = -1,ret;

repository->Get(0x7e000001, mode);

for(int i=0;i<100;i++)

{

TInt k = mode << 24 | i;

ret=repository->Set(k, 1);

}

delete repository;

repository = NULL;

上一页  1 2 3 4 5  下一页

Tags:symbian 来电 铃声

编辑录入:coldstar [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接