×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    14

    File I/O Error in Retrieving Incoming/Outgoing number

    I have created an application using the following piece of code at one of the discussion boards
    Code:
    #ifndef TELEPHONY_H_
    #define TELEPHONY_H_
    
    #include <e32base.h>
    #include <Etel3rdParty.h>
    
    class CNotifyExample : public CActive
    {
    
    public:
    // Constructor/Destructor
    CNotifyExample( CTelephony* aTelephony );
    
    // Request voice line status change notification
    void RequestNotification();
    
    void GetNumber();
    
    private:
    /*
    These are the pure virtual methods from CActive that
    MUST be implemented by all active objects
    */
    void RunL();
    void DoCancel();
    
    private:
    
    /*
    A reference to a CTelephony, obtained with CTelephony::NewL()
    or NewLC()
    */
    CTelephony* iTelephony;
    
    /*
    When the voice line status changes (and hence the asynchronous
    operation completes) the new voice line status is written into
    iLineStatus. Until this point, iLineStatus is not valid.
    
    If you change this class to get notification of other events,
    then change this class. CTelephony::TNotificationEvent lists
    the classes associated with each event.
    */
    CTelephony::TCallStatusV1 iLineStatus;
    CTelephony::TCallStatusV1Pckg iLineStatusPckg;
    CTelephony::TCallStatus iLastInformedLineStatus;
    };
    
    
    //------------------------------------------------------------------------
    
    #include <e32base.h>
    #include <Etel3rdParty.h>
    #include <f32file.h>
    #include "TelephonyClasses.h"
    
    /*
    Default constructor. Pass it a reference to a CTelephony, created
    with CTelephony::NewL() or NewLC()
    */
    
    
    void LogNew(const TDesC& aDes)
    {
    
    RFs aFs;
    aFs.Connect();
    
    
    RFile aFile;
    TBuf<32> aFileName = _L("C:\\");
    aFileName.Append(aDes);
    aFileName.Append(_L(".txt"));
    aFile.Create(aFs,aFileName,EFileWrite);
    aFile.Close();
    
    aFs.Close();
    
    
    }
    
    CNotifyExample::CNotifyExample( CTelephony* aTelephony )
    : CActive( EPriorityStandard ),
    iTelephony( aTelephony ),
    iLineStatusPckg( iLineStatus )
    {
    CActiveScheduler::Add(this);
    //default constructor
    iLineStatus.iStatus = CTelephony::EStatusUnknown;
    iLastInformedLineStatus = CTelephony::EStatusUnknown;
    
    }
    /*
    This method requests notification by calling
    CTelephony::NotifyChange() to initialise an asynchronous operation.
    Then it immediately calls CActive::SetActive to start the
    operation. The operation completes when the notification event
    occurs.
    
    In this case, we tell CTelephony to wait for the
    CTelephony::EVoiceLineStatusChange notification event, hence the
    event occurs when the voice line status changes.
    
    For other events, change the notification event in the call to
    CTelephony::NotifyChange(). The CTelephony::TNotificationEvent
    description all the notification events.
    It also list the information class to
    pass to CTelephony::NotifyChange(). The TCallStatus
    class is associated with CTelephony::EVoiceLineStatusChange.
    */
    void CNotifyExample::RequestNotification()
    {
    
    /*
    Panic if this object is already performing an asynchronous
    operation
    */
    _LIT( KNotifyExamplePanic, "CNotifyExample" );
    __ASSERT_ALWAYS( !IsActive(), User::Panic( KNotifyExamplePanic, 1 ));
    
    Cancel();
    
    iTelephony->NotifyChange( iStatus,
    CTelephony::EVoiceLineStatusChange,
    iLineStatusPckg );
    
    SetActive();
    
    }
    
    /*
    The active object's RunL method is called when the asynchronous
    event completes. In this case, RunL is called when the voice line
    status changes. When this occurs, the new voice line status is
    written to the iLineStatus. iLineStatus was passed to
    CTelephony::NotifyChange() when the asynchronous operation was
    started.
    
    This is where you put your code to respond to your chosen
    notification event.
    
    In all active objects, iStatus indicates whether the asynchronous
    operation succeeded, failed, or is still in progress. KErrNone
    indicates success, and hence the value in iStatus is valid.
    */
    
    void CNotifyExample::RunL()
    {
    //if( iStatus==KErrNone )
    {
    /*
    Insert code to respond to the change of voice line status
    here. A typical use to answer a call if the voice line
    status is 'ringing' (EStatusRinging)
    
    Remember that you must implement a RunError() method if
    your code in RunL can leave.
    */
    //if( iLineStatus.iStatus == CTelephony::EStatusRinging )
    ; // Answer call by calling 'AnswerIncomingCall()'
    
    
    
    
    if(iLineStatus.iStatus == CTelephony::EStatusIdle)
    GetNumber();
    
    if(iLineStatus.iStatus == CTelephony::EStatusUnknown)
    GetNumber();
    
    if(iLineStatus.iStatus == CTelephony::EStatusDialling)
    GetNumber();
    
    if(iLineStatus.iStatus == CTelephony::EStatusReconnectPending)
    GetNumber();
    
    if(iLineStatus.iStatus == CTelephony::EStatusHold)
    GetNumber();
    
    if(iLineStatus.iStatus == CTelephony::EStatusTransferring)
    GetNumber();
    
    if(iLineStatus.iStatus == CTelephony::EStatusTransferAlerting)
    GetNumber();
    
    
    if(iLineStatus.iStatus == CTelephony::EStatusRinging)
    {
    if(iLastInformedLineStatus != CTelephony::EStatusDialling)
    GetNumber();
    }
    
    
    if(iLineStatus.iStatus == CTelephony::EStatusAnswering)
    GetNumber();
    
    if(iLineStatus.iStatus == CTelephony::EStatusConnecting)
    GetNumber();
    
    
    if(iLineStatus.iStatus == CTelephony::EStatusConnected)
    GetNumber();
    
    if(iLineStatus.iStatus == CTelephony::EStatusDisconnecting)
    GetNumber();
    
    
    iLastInformedLineStatus = iLineStatus.iStatus;
    
    /* Request the next notification */
    iTelephony->NotifyChange( iStatus,
    CTelephony::EVoiceLineStatusChange,
    iLineStatusPckg );
    SetActive();
    
    }
    
    }
    
    /*
    Like all active objects, you must supply a DoCancel() method to
    cancel the asynchronous operation. This must cancel a CTelephony
    notification operation with CTelephony::CancelAsync. Give the method
    the appropriate 'cancellation event' from those in 'TCancellationRequest'
    
    In this case, we are cancelling the "voice line status Change" event,
    and so we need to supply the EVoiceLineStatusChange cancellation code.
    If you change this class to respond to a different notification
    event, remember to change the call to CTelephony::CancelAsync.
    */
    void CNotifyExample:oCancel()
    {
    iTelephony->CancelAsync( CTelephony::EVoiceLineStatusChangeCancel );
    }
    
    
    
    void CNotifyExample::GetNumber()
    {
    CTelephony::TCallInfoV1 callInfoV1;
    CTelephony::TCallInfoV1Pckg callInfoV1Pckg( callInfoV1 );
    
    CTelephony::TCallSelectionV1 callSelectionV1;
    CTelephony::TCallSelectionV1Pckg callSelectionV1Pckg( callSelectionV1 );
    
    CTelephony::TRemotePartyInfoV1 remotePartyInfoV1;
    CTelephony::TRemotePartyInfoV1Pckg remotePartyInfoV1Pckg( remotePartyInfoV1 );
    
    callSelectionV1.iLine = CTelephony::EVoiceLine;
    callSelectionV1.iSelect = CTelephony::EInProgressCall;
    
    
    iTelephony->GetCallInfo( callSelectionV1Pckg, callInfoV1Pckg, remotePartyInfoV1Pckg );
    
    TBuf<64> remoteNumber;
    if(remotePartyInfoV1.iRemoteIdStatus==CTelephony::ERemoteIdentityAvailable)
    {
    // remotePartyInfoV1.iRemoteIdStatus==CTelephony::ERemoteIdentityAvailable .....never comes true and the
    // execution never reaches here
    remoteNumber.Copy(remotePartyInfoV1.iRemoteNumber.iTelNumber);
    }
    else
    {
    // We always come here and the length of remotePartyInfoV1.iRemoteNumber.iTelNumber is always 0
    remoteNumber.Copy(remotePartyInfoV1.iRemoteNumber.iTelNumber);
    }
    
    if(remotePartyInfoV1.iRemoteNumber.iTelNumber.Length() > 0)
    {
    LogNew(_L("A"));
    LogNew(remotePartyInfoV1.iRemoteNumber.iTelNumber);
    
    }
    
    else
    LogNew(_L("B"));
    
    if(callInfoV1.iDialledParty.iTelNumber.Length() > 0)
    {
    LogNew(_L("C"));
    LogNew(callInfoV1.iDialledParty.iTelNumber);
    
    }
    
    else
    LogNew(_L("D"));
    
    
    }
    
    And this is how i use this class in HelloWorldBasic example
    
    void CHelloWorldBasicAppUi::ConstructL()
    {
    // Initialise app UI with standard value.
    BaseConstructL(CAknAppUi::EAknEnableSkin);
    
    // Create view object
    iAppView = CHelloWorldBasicAppView::NewL( ClientRect() );
    
    iTelephony = CTelephony::NewL();
    
    iNotifyExample = new (ELeave) CNotifyExample(iTelephony);
    
    iNotifyExample->RequestNotification();
    
    }
    while running it one the emulator the application simply doesn't open.

    also while creating a .sis file to test on the device,
    i get the following error:
    test_gcce.pkg(19) : error: file I/O fault.

    what am i doing wrong??
    Last edited by harsh_vs; 2008-03-05 at 18:29. Reason: wrong title

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,684

    Re: File I/O Error in Retrieving Incoming/Outgoing number

    Check the 19th line of the .pkg file, however it will likely be the .exe file. Make sure that you have actually built your project to the GCCE target (Project - Build? - menu, Active Build Configuration, or something similar).

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    14

    Re: File I/O Error in Retrieving Incoming/Outgoing number

    i tried doing so... here's how i did it:
    Code:
    C:\tele\group>bldmake bldfiles
    WARNING: Cannot determine the version of the RVCT Compiler.
    WARNING: When building for ARMV5 platform Compiler RVCT2.2 or later is required.
    
    
    C:\tele\group>abld build gcce urel
      make -r  -f "\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\EXPORT.make" EXPORT
    VERBOSE=-s
    make: Nothing to be done for `EXPORT'.
      make -r  -f "\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\GCCE.make" MAKEFILE
    VERBOSE=-s
    make -s  -C \tele\group -f "ICONS_SCALABLE_DC.MK" TO_ROOT=..\.. EPOCBLD=..\..\Sy
    mbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\ICONS_SCALABLE_DC\GCCE TO_BLDINF=..\..
    \tele\group PLATFORM=GCCE MAKMAKE
    perl -S makmake.pl  -D \tele\group\TEST GCCE
    WARNING: Cannot determine the version of the RVCT Compiler.
    In file included from ..\src\testAppUi.cpp:12:
    ..\src\tele.h:1: unterminated `#if' conditional
    ERROR: cpp.EXE failure
    make: *** [MAKEFILETEST] Error 33
      make -r  -f "\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\GCCE.make" LIBRARY V
    ERBOSE=-s
    make -s  -C \tele\group -f "ICONS_SCALABLE_DC.MK" TO_ROOT=..\.. EPOCBLD=..\..\Sy
    mbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\ICONS_SCALABLE_DC\GCCE TO_BLDINF=..\..
    \tele\group PLATFORM=GCCE LIB
    make -s  -r -f "\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\TEST\GCCE\TEST.GCCE
    " LIBRARY
    make[1]: \Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\TEST\GCCE\TEST.GCCE: No su
    ch file or directory
    make[1]: *** No rule to make target `\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\grou
    p\TEST\GCCE\TEST.GCCE'.  Stop.
    make: *** [LIBRARYTEST] Error 2
      make -r  -f "\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\GCCE.make" RESOURCE
    CFG=UREL VERBOSE=-s
    make -s  -C \tele\group -f "ICONS_SCALABLE_DC.MK" TO_ROOT=..\.. EPOCBLD=..\..\Sy
    mbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\ICONS_SCALABLE_DC\GCCE TO_BLDINF=..\..
    \tele\group PLATFORM=GCCE CFG=UREL RESOURCE
    Checking: ..\gfx\qgn_menu_test.svg
    Choosing...
    Loading mif icons...
    Loading file: ..\gfx\qgn_menu_test.svg
    Writing mif: \Symbian\9.1\S60_3rd\epoc32\data\z\resource\apps\test_aif.mif
    make -s  -r -f "\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\TEST\GCCE\TEST.GCCE
    " RESOURCEUREL
    make[1]: \Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\TEST\GCCE\TEST.GCCE: No su
    ch file or directory
    make[1]: *** No rule to make target `\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\grou
    p\TEST\GCCE\TEST.GCCE'.  Stop.
    make: *** [RESOURCETEST] Error 2
      make -r  -f "\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\GCCE.make" TARGET CF
    G=UREL VERBOSE=-s
    make -s  -C \tele\group -f "ICONS_SCALABLE_DC.MK" TO_ROOT=..\.. EPOCBLD=..\..\Sy
    mbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\ICONS_SCALABLE_DC\GCCE TO_BLDINF=..\..
    \tele\group PLATFORM=GCCE CFG=UREL BLD
    make -s  -r -f "\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\TEST\GCCE\TEST.GCCE
    " UREL
    make[1]: \Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\TEST\GCCE\TEST.GCCE: No su
    ch file or directory
    make[1]: *** No rule to make target `\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\grou
    p\TEST\GCCE\TEST.GCCE'.  Stop.
    make: *** [TARGETTEST] Error 2
      make -r  -f "\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\GCCE.make" FINAL CFG
    =UREL VERBOSE=-s
    make -s  -C \tele\group -f "ICONS_SCALABLE_DC.MK" TO_ROOT=..\.. EPOCBLD=..\..\Sy
    mbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\ICONS_SCALABLE_DC\GCCE TO_BLDINF=..\..
    \tele\group PLATFORM=GCCE CFG=UREL FINAL
    also i tried creating the sis file
    but the error remains so...
    Last edited by harsh_vs; 2008-03-05 at 19:05. Reason: incomplete info

  4. #4
    Registered User
    Join Date
    Nov 2007
    Posts
    4

    Unhappy Re: File I/O Error in Retrieving Incoming/Outgoing number

    Even i encounter the same error. If u try to create a simple project such as helloworld using codewarrior.

    bldmake bldfiles
    abld build gcce urel

    Although the .exe is created in the release folder of epoc, while creating the .sis file using makesis command, there is the same error that is

    File I/O

    help!!!!!!!

  5. #5
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: File I/O Error in Retrieving Incoming/Outgoing number

    then check the line number given and see which file it is. Also you could add absolute paths to your pkg to make it work better in all situations.

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,684

    Re: File I/O Error in Retrieving Incoming/Outgoing number

    These are the important parts
    make[1]: *** No rule to make target `\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\grou
    p\TEST\GCCE\TEST.GCCE'. Stop.
    make: *** [RESOURCETEST] Error 2
    make -r -f "\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\GCCE.make" TARGET CF
    G=UREL VERBOSE=-s
    make -s -C \tele\group -f "ICONS_SCALABLE_DC.MK" TO_ROOT=..\.. EPOCBLD=..\..\Sy
    mbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\ICONS_SCALABLE_DC\GCCE TO_BLDINF=..\..
    \tele\group PLATFORM=GCCE CFG=UREL BLD
    make -s -r -f "\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\TEST\GCCE\TEST.GCCE
    " UREL
    make[1]: \Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\group\TEST\GCCE\TEST.GCCE: No su
    ch file or directory
    make[1]: *** No rule to make target `\Symbian\9.1\S60_3rd\EPOC32\BUILD\tele\grou
    p\TEST\GCCE\TEST.GCCE'. Stop.
    make: *** [TARGETTEST] Error 2
    Your project is not built. Have you installed the CSL Toolchain (Start Menu, All Programs, S60 Developer Tools, 3rd Edition Something, Something, Tools, CSL Toolchaing (GCCE) Install)?

  7. #7
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: File I/O Error in Retrieving Incoming/Outgoing number

    A quick look at the output log shows the reason
    "In file included from ..\src\testAppUi.cpp:12:
    ..\src\tele.h:1: unterminated `#if' conditional
    ERROR: cpp.EXE failure
    make: *** [MAKEFILETEST] Error 33"
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

Similar Threads

  1. BUGS?! Identified Video/Audio recording problems on N93
    By arikr7 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2007-03-19, 19:55
  2. Audio Recording settings for the smallest file size
    By rafeeqpv in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-03-06, 04:29
  3. Recording Audio in file using CMdaAudioRecordUtility in S60 V3
    By gpalvia in forum Symbian Media (Closed)
    Replies: 6
    Last Post: 2006-08-15, 10:40
  4. Replies: 1
    Last Post: 2005-05-26, 14:22
  5. Replies: 0
    Last Post: 2002-06-10, 12:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×