Re[6]: Как отправить DTMF ? (Nokia 6670, Symbian 7.0s Series
От: iand  
Дата: 24.03.05 13:56
Оценка:
Здравствуйте, CrystaX, Вы писали:

CX>Да, именно все и надо качать. По отдельности не получится. Мои соболезнования.


Достал SDK. Не инсталировал, прошвырнулся по архивам "на скору руку". Доку распаковал, тоже по быстрому глянул.
etelmm.h там нет, есть у меня в SDK 7.0s v.2.1.

Модифицировал пример dialer.

void CDialerAppUi::DialNumberL(const TDesC& aPhoneNumber)
    {
    //Create a connection to the tel server
    RTelServer server;
    CleanupClosePushL(server);
    User::LeaveIfError(server.Connect());

    //Load in the phone device driver
    User::LeaveIfError(server.LoadPhoneModule(KTsyName));
    
    //Find the number of phones available from the tel server
    TInt numberPhones;
    User::LeaveIfError(server.EnumeratePhones(numberPhones));

    //Check there are available phones
    if (numberPhones < 1)
        {
        User::Leave(KErrNotFound);
        }

    //Get info about the first available phone
    RTelServer::TPhoneInfo info;
    User::LeaveIfError(server.GetPhoneInfo(0, info));

    //Use this info to open a connection to the phone, the phone is identified by its name
    //RPhone phone;
    RMobilePhone phone;

    CleanupClosePushL(phone);
    User::LeaveIfError(phone.Open(server, info.iName));

    //Get info about the first line from the phone
    RMobilePhone::TLineInfo lineInfo;
    User::LeaveIfError(phone.GetLineInfo(0, lineInfo));

    //Use this to open a line
    RLine line;
    CleanupClosePushL(line);
    User::LeaveIfError(line.Open(phone, lineInfo.iName));

    //Open a new call on this line
    TBuf <100> newCallName;
    RCall call;
    CleanupClosePushL(call);
    User::LeaveIfError(call.OpenNewCall(line, newCallName));

    //newCallName will now contain the name of the call
    User::LeaveIfError(call.Dial(aPhoneNumber));

    RCall::TStatus aStatus;
    call.GetStatus(aStatus);

    if (aStatus ==  RCall::EStatusConnected)
        phone.SendDTMFTones(KPhoneNumberDTMF2);
    
    //Close the phone, line and call connections and remove them from the cleanup stack
    //NOTE: This does not hang up the call
    CleanupStack::PopAndDestroy(3);//phone, line, call

    //Unload the phone device driver
    User::LeaveIfError(server.UnloadPhoneModule(KTsyName));

    //Close the connection to the tel server and remove it from the cleanup stack
    CleanupStack::PopAndDestroy(&server);

Ошибка.
D:\SYMBIAN\7.0S\SERIES60_V21\SERIES60EX\DIALER\SRC\Dialerappui.cpp(146) : error C2039: 'SendDTMFTones' : is not a member of 'RMobilePhone'\Symbian\7.0s\Series60_v21\EPOC32\INCLUDE\etelmm.h(13) : see declaration of 'RMobilePhone'
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.