0

这是计算存储在 SIM 卡上的联系人数量的代码。当我编译它时,我收到错误,表明应该包含用于使用 RBasicGsmPhone 的库。我google了很多,发现需要gsmbas.lib,但是mmp文件建议中没有这样的lib文件。该怎么办??有人请帮忙

TInt SimCntCount = 0;

    /*this code is just to get the TSY name*/
    CCommsDatabase* db = CCommsDatabase::NewL(EDatabaseTypeUnspecified); 

    CleanupStack::PushL(db); 

    CCommsDbTableView* table = db->OpenTableLC(TPtrC(MODEM)); 

    table->GotoFirstRecord(); 

    table->ReadTextL(TPtrC(MODEM_TSY_NAME),iTsyName); 

    // Cleanup - CommsDB no longer needed 
    CleanupStack::PopAndDestroy(2); // table,db 

    // Connect to the ETel server 
    RTelServer aTelServer; 

    User::LeaveIfError(aTelServer.Connect()); 

    CleanupClosePushL(aTelServer); 

    User::LeaveIfError(aTelServer.LoadPhoneModule(iTsyName)); 

    TInt numberOfPhones; 

    User::LeaveIfError(aTelServer.EnumeratePhones(numberOfPhones)); 

    SimCntCount = 0;

    for (TInt i=numberOfPhones; i>0; i--) { 
        // Get the phone name 
        RTelServer::TPhoneInfo phoneInfo; 

        User::LeaveIfError(aTelServer.GetPhoneInfo(i-1,phoneInfo)); 

        // Open the phone by name 
        RBasicGsmPhone phone; 

        User::LeaveIfError(phone.Open(aTelServer,phoneInfo.iName)); 

        TInt phoneBookCount;

        phone.EnumeratePhoneBooks(phoneBookCount);

        RBasicGsmPhone::TPhoneBookInfo aPbInfo;

        for(TInt j=0;j<phoneBookCount;j++){
            phone.GetPhoneBookInfo(j,aPbInfo);

            SimCntCount += aPbInfo.iUsed;
        }
        phone.Close();
    } 
    CleanupStack::PopAndDestroy(1);     
4

1 回答 1

0

有些库实际上是不公开的,必须从诺基亚获得。您可以尝试联系诺基亚的 Symbian 支持以了解此主题 - 如果他们仍然对此感兴趣。

于 2012-06-14T18:17:30.610 回答