×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    81

    illegal access from 'CMySIPObserver' to protected/private member 'MSIPObserver'

    This is my first hands-on program in SIP and i found my self facing an error upon my first line
    The error I'm getting is
    ###############################################
    illegal access from 'CMySIPObserver' to protected/private member 'MSIPObserver'
    ###############################################
    and the line of code where it complains:
    ##############################################
    iSIP = CSIP::NewL(KAppUID, *iObserver);
    ##############################################
    This is inside my AppUi second phase constructor with iSIP and iObserver defined as pointers to CSIPObserver and CMySIPObserver.
    The definition of my observer class is as follows
    ####################################################
    //The header file SIP1MySIPObserver.h
    #ifndef SIP1MYSIPOBERVER_H_
    #define SIP1MYSIPOBERVER_H_
    #include <sip.h>
    #include <sipobserver.h>
    #include <sipservertransaction.h>

    class CMySIPObserver : public CBase,
    MSIPObserver
    {
    public:
    CMySIPObserver();

    void IncomingRequest(TUint32 aIapId,
    CSIPServerTransaction* aTransaction);

    void TimedOut(CSIPServerTransaction& aTransaction);
    };
    #endif /* SIP1MYSIPOBERVER_H_ */
    //The source file SIP1MySIPObserver.cpp
    #include <SIP1MySIPOberver.h>

    CMySIPObserver::CMySIPObserver()
    {

    }
    void CMySIPObserver::IncomingRequest(TUint32 aIapId,
    CSIPServerTransaction* aTransaction)
    {

    }

    void CMySIPObserver::TimedOut(CSIPServerTransaction& aTransaction)
    {

    }
    //End of file
    #####################################################
    I know that the problem is trivial but i can't pick up on it. I also didn't include any definitions because i wanted it to just compile(and i don't think this is the problem)

    It will also be appreciated if someone can post an example that explains just SIP because the SIPExample included with the SDK is very convoluted that i can't tell which file belongs to which(sipengine, gameengine, socketengine ...)albeit they are separated.
    Thanks in advance.
    Last edited by islamfunny; 2009-04-22 at 04:23.

  2. #2
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    81

    Re: illegal access from 'CMySIPObserver' to protected/private member 'MSIPObserver'

    Could at least somebody post a template code for an implementation for MSIPObserver class ?

  3. #3
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: illegal access from 'CMySIPObserver' to protected/private member 'MSIPObserver'

    This is not right way to implement observer. You need to derive your appui from MSIPObserver interface and then pass pointer of your appui to CMySIPObserver. Also you have to implement pure virtual method of MSIPObserver in appui.

  4. #4
    Registered User
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122

    Re: illegal access from 'CMySIPObserver' to protected/private member 'MSIPObserver'

    Quote Originally Posted by islamfunny View Post
    illegal access from 'CMySIPObserver' to protected/private member 'MSIPObserver'


    class CMySIPObserver : public CBase,
    MSIPObserver
    Here you're private inheriting MSIPObserver. Change it to public inheritance with "public MSIPObserver".

    Lauri

Similar Threads

  1. Access Point Connection Problem on N96... Help!
    By asenechalM5T in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2008-11-17, 15:00
  2. illegal Access from..
    By revasenthil in forum Symbian
    Replies: 1
    Last Post: 2008-01-06, 20:08
  3. Nokia 6101 Locked 2 TMobile Midlet can't access internet...
    By Jason Glass in forum Mobile Java Networking & Messaging & Security
    Replies: 45
    Last Post: 2007-11-14, 02:19
  4. Why use direct screen access?
    By Kalderas in forum Symbian
    Replies: 3
    Last Post: 2003-10-10, 14:29

Posting Permissions

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