From:http://www.sf.org.cn/Article/symbiandev/200711/20680.html
设备, 软件版本: S60 3rd Edition, FP1
可以通过使用Profiles Engine Wrapper API来获取当前情景模式
首先需要包含这两个头文件:
mproengengine.h
proengfactory.h
然后是链接库:
ProfileEngine.lib
再看下列演示代码:
MProEngEngine* engine = ProEngFactory::NewEngineLC();
TInt activeId( engine->ActiveProfileId() );
通过调用ActiveProfileId()我们可以获取如下返回值:
0 - General
1 - Silent
2 - Meeting
3 - Outdoor
4 - Pager
5 – Offline