×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    Problem to compile series60 3rd

    Hi!
    I need your help. I want to port an application from series60 2nd edition to series60 3rd edition. The file FinderConatctsCommunication doesn't compile and i don't understand why (i don't understant the errors messages).

    Code:
    Finder_contactscommunication.cpp
    In file included from ..\\src\\Finder_contactscommunication.cpp:6:
    ..//..//..//..//..//Symbian//9.1//S60_3rd//EPOC32//include/eikmenup.h: In member function `TBool CEikMenuPaneItem::IsScaleableText(const TDesC&) const':
    ..//..//..//..//..//Symbian//9.1//S60_3rd//EPOC32//include/eikmenup.h:183: warning: enumeral mismatch in conditional expression: `TFalse' vs `TTrue'
    In file included from ..//..//..//..//..//Symbian//9.1//S60_3rd//EPOC32//include/eikenv.h:25,
                     from ..\\src\\Finder_contactscommunication.cpp:14:
    ..//..//..//..//..//Symbian//9.1//S60_3rd//EPOC32//include/babitflags.h:240:7: warning: no newline at end of file
    ..\\src\\Finder_contactscommunication.cpp:23:51: sendas.h: No such file or directory
    In file included from ..//..//..//..//..//Symbian//9.1//S60_3rd//EPOC32//include/aknappui.h:29,
                     from ..//..//..//..//..//Symbian//9.1//S60_3rd//EPOC32//include/aknpopupheadingpane.h:32,
                     from ..//..//..//..//..//Symbian//9.1//S60_3rd//EPOC32//include/aknlistquerycontrol.h:23,
                     from ..//..//..//..//..//Symbian//9.1//S60_3rd//EPOC32//include/AknQueryDialog.h:36,
                     from ..\\src\\Finder_contactscommunication.cpp:26:
    ..//..//..//..//..//Symbian//9.1//S60_3rd//EPOC32//include/AknTouchPaneObserver.h:47:19: warning: no newline at end of file
    In file included from ..//inc/FinderUtils.h:2,
                     from ..\\src\\Finder_contactscommunication.cpp:33:
    ..//inc/crypto.h:354:7: warning: no newline at end of file
    In file included from ..//inc/FinderPluginContent.h:24,
                     from ..//inc/FinderPlugin.h:33,
                     from ..//inc/FinderUtils.h:39,
                     from ..\\src\\Finder_contactscommunication.cpp:33:
    ..//inc/FinderBitfields.inl:111:48: warning: no newline at end of file
    In file included from ..//inc/FinderUtils.h:51,
                     from ..\\src\\Finder_contactscommunication.cpp:33:
    ..//inc/FinderFileFinder.inl:233:6: warning: no newline at end of file
    make[1]: *** [..\..\..\..\..\Symbian\9.1\S60_3rd\EPOC32\BUILD\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group\MOBIFINDIT_3RD\GCCE\UDEB\Finder_ContactsCommunication.o]
    Error 1
    make: *** [TARGETMOBIFINDIT_3RD] Error 2
      make -r  -f "\Symbian\9.1\S60_3rd\EPOC32\BUILD\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group\GCCE.make" FINAL CFG=UDEB VERBOSE=-s
    make -s  -C \codeMobifindit\mobifindit3rdEdition\Findit\Findit\group -f "MOBIFINDIT_ICON.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\Symbian\9.1\S60_3rd\EPOC32\BUILD\cod
    eMobifindit\mobifindit3rdEdition\Findit\Findit\group\MOBIFINDIT_ICON\GCCE TO_BLDINF=..\..\..\..\..\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group PLATFORM=GCCE CFG=UD
    EB FINAL
    make -s  -C \codeMobifindit\mobifindit3rdEdition\Findit\Findit\group -f "MOBIFINDIT_BITMAPS.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\Symbian\9.1\S60_3rd\EPOC32\BUILD\
    codeMobifindit\mobifindit3rdEdition\Findit\Findit\group\MOBIFINDIT_BITMAPS\GCCE TO_BLDINF=..\..\..\..\..\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group PLATFORM=GCCE
    CFG=UDEB FINAL


    Thanks for your help

  2. #2
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    Re: Problem to compile series60 3rd

    Finder_ContactsCommunication
    Code:
    #include "CompilationSettings.h"
    
    #include <e32base.h>
    #include <e32std.h>            
    #include <avkon.hrh>
    #include <eikmenup.h>
    #include <cntdb.h>
    #include <cntitem.h>
    #include <etel.h>
    #include <commdb.h>
    #include <sendui.h>
    #include <SenduiMtmUids.h>
    #include <eikapp.h>
    #include <eikenv.h>
    
    #include <mobifindit.rsg>
    #include "mobifindit.hrh"
    
    
    #include <txtrich.h>                // for CRichText
    #include <eikenv.h>                 // for CEikonEnv 
    #include <smut.h>                   // for message type UIDs
    #include <sendas.h>                 // for CSendAs
    #include <msvuids.h>                // for Message type UIDs
    #include <miutset.h>                // for KUidMsgTypeSMTP
    #include <AknQueryDialog.h>         // for CAknTextQueryDialog
    #include <mtmuids.h>                // for KUidMtmQueryCanSendMsg etc. capability query UIDs
    #include <txtfmlyr.h>               // for CParaFormatLayer,CCharFormatLayer 
    #include <sendui.h>                 // for CSendAppUi
    #include <mmsconst.h>               // for KUidMsgTypeMultimedia
    
    
    #include "FinderUtils.h"
    #include "FinderContacts.h"
    #include "FinderAsyncDialer.h"
    #include "FinderPlugin.h"
    
    #define SAVAGE_LOG
    #ifdef SAVAGE_LOG
    #include <badesca.H>
    #include <apgwgnam.h>
    #include <w32std.h>
    #include <apgcli.h>
    #include <eikenv.h>
    #include <SysUtil.h>
    #include <commdb.h>
    #include <e32def.h>
    #include <Pathinfo.h>
    #include <coemain.h>
    
    TBool GetLogPath(const TDesC& sLogFilename,Utils::TFilenamePath &a_sPath)
    {
    	TFileName fileName = CEikonEnv::Static()->EikAppUi()->Application()->AppFullName();
    	TParsePtr parser(fileName);
    	const TDesC&	sRootPath   =  parser.DriveAndPath();
    
    	//const TDesC&	sRootPath=PathInfo::PhoneMemoryRootPath(); 
    	//const TDesC&	sOthersPath=PathInfo::OthersPath();
    
    	// Build log path
    	a_sPath=sRootPath;
    	//Utils::AppendSafe((TDes16*)&a_sPath,sOthersPath);
    
    	// Append log filename
    	Utils::AppendSafe((TDes16*)&a_sPath,sLogFilename);
    
    	return true;
    }
    
    TBool GetFs(RFs*& a_pRFs)
    {
    	// Get access to the ui session..
    	if(CCoeEnv::Static())
    	{
    		a_pRFs=&CCoeEnv::Static()->FsSession();
    		return false;
    	}
    
    	// .. or allocate it
    	RFs		*pRFsSession=new RFs();
    	TBool	m_bFsSessionOwned=false;
    
    	if(pRFsSession)
    	{
    		// Connect to fileserver
    		if(pRFsSession->Connect()!=KErrNone)
    		{
    			delete pRFsSession;
    			pRFsSession=NULL;
    		}
    		else
    		{
    			m_bFsSessionOwned=true;
    		}
    	}
    	a_pRFs=pRFsSession;
    	return m_bFsSessionOwned;
    }
    
    // Creates the log file
    void xCreateLog(const TDesC& sLogFilename,bool bOverWritePrevious)
    {
    	Utils::TFilenamePath	sLogPath;
    	RFs*					pFs;
    
    	// Retrieve the database file full path name(alternate name)
    	if(GetLogPath(sLogFilename,sLogPath))
    	{
    		RFile		dbFile;
    		TBool	bOwned=false;
    
    		GetFs(pFs);
            bool succeeded = false;
    
            if(bOverWritePrevious) 
            {
    		    // Remove any previous file
    		    pFs->Delete(sLogPath);
        		succeeded =(dbFile.Create(*pFs,sLogPath,EFileShareReadersOnly|EFileStreamText|EFileWrite) == KErrNone);
            }
            else
            {
                succeeded =(dbFile.Open(*pFs,sLogPath,EFileShareReadersOnly|EFileStreamText|EFileWrite) == KErrNone);
                if(true == succeeded)
                {
                    TInt seekOffset = 0;
                    dbFile.Seek(ESeekEnd,seekOffset);
                }
                else // file does not exist - create it
                {
                    succeeded =(dbFile.Create(*pFs,sLogPath,EFileShareReadersOnly|EFileStreamText|EFileWrite)==KErrNone);
                }        
            }
    
    		// Create the alternate database file
    		if(true == succeeded)
    		{
    			// Close the database file
    			dbFile.Close();
    		}
    		if(bOwned)
    		{
    			APPDELETECLOSE(pFs);
    		}
    	}
    }
    
    // Append text to the log file
    void xAppendToLog(const TDesC& sLogFilename,const TDesC& sText)
    {
    	Utils::TFilenamePath	sLogPath;
    	RFs*					pFsSession;
    
    	// Retrieve the database file full path name(alternate name)
    	if(GetLogPath(sLogFilename,sLogPath))
    	{
    		const TBool	bOwned=GetFs(pFsSession);
    		if(pFsSession)
    		{
    			RFile	dbFile;
    
    			// Create the alternate database file
    			if(dbFile.Open(*pFsSession,sLogPath,EFileWrite)==KErrNone)
    			{
    				TInt	m_uEntriesStartOffset=0L;
    				dbFile.Seek(ESeekEnd,m_uEntriesStartOffset);
    
    				for(;;)
    				{
    					TUint			uSrcLength=(TUint)sText.Length();
    					const TUint16*	pSrc=(TUint16*)sText.Ptr();
    
    					if(uSrcLength)
    					{
    						do
    						{
    							TPtrC8			fp;
    							const TUint8	c=(TUint8)(*pSrc++);
    
    							fp.Set((TUint8 *)(&c),1);
    							dbFile.Write(fp);
    						}while(--uSrcLength);
    					}
    
    					// Close the database file
    					dbFile.Close();
    					break;
    				}
    			}
    			if(bOwned)
    			{
    				APPDELETECLOSE(pFsSession);
    			}
    		}
    	}
    }
    #endif//SAVAGE_LOG

  3. #3
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    Re: Problem to compile series60 3rd

    the rest of the file...

    Code:
    void CFinderContacts::CommunicationDialL(const TDesC& aPhoneNumber)
    {
    	if(!m_pDialer)
    	{
    		m_pDialer=CFinderAsyncDialer::NewL();
    	}
    	if(m_pDialer&&(!m_pDialer->IsActive()))
    	{
    		m_pDialer->Dial(aPhoneNumber);
    	}
    }
    
    /*
     *	
     */
    
    void CFinderContacts::CommunicationSendSmsL(const TDesC& aPhoneNumber)
    {
    	//if(m_pSendAppUi)
    	//{
    		CParaFormatLayer*	paraFormatLayer=CParaFormatLayer::NewL();
    		CleanupStack::PushL(paraFormatLayer);
    
    		CCharFormatLayer*	charFormatLayer=CCharFormatLayer::NewL();
    		CleanupStack::PushL(charFormatLayer);
    
    		CRichText* pMessageBodyContent=CRichText::NewL(paraFormatLayer,charFormatLayer); 
    		CleanupStack::PushL(pMessageBodyContent);
    		pMessageBodyContent->InsertL(0,_L(""));
    
        CDesCArrayFlat*		pAddressArray=new(ELeave)CDesCArrayFlat(1);
        CleanupStack::PushL(pAddressArray);
        
    		pAddressArray->AppendL(aPhoneNumber);
    		//m_pSendAppUi->CreateAndSendMessageL(KUidMsgTypeSMS, pMessageBodyContent,
    		//																		NULL, KNullUid, pAddressArray, NULL, EFalse);
        
    		CleanupStack::PopAndDestroy(pAddressArray);
    		CleanupStack::PopAndDestroy(3); //pMessageBodyContent,charFormatLayer,paraFormatLayer
    	//}
    }
    
    CFinderAsyncDialer::CFinderAsyncDialer()
    	:	CActive(CActive::EPriorityStandard),
    		m_eState(TCallState_Idle)
    {
    }
    
    
    CFinderAsyncDialer* CFinderAsyncDialer::NewL()
    {
    	CFinderAsyncDialer* self=NewLC();
    	CleanupStack::Pop();
    	return(self);
    }
    
    
    CFinderAsyncDialer* CFinderAsyncDialer::NewLC()
    {
    	CFinderAsyncDialer* self=new(ELeave) CFinderAsyncDialer();
    	CleanupStack::PushL(self);
    	self->ConstructL();
    	return(self);
    }
    
    void CFinderAsyncDialer::ConstructL()
    {
    	//Create a connection to the tel server
    	//CleanupClosePushL(server);
    	xAppendToLog(_L("Ph.txt"),_L("server.Connect()\n"));
    	User::LeaveIfError(server.Connect());
    		m_eState=TCallState_Connected;
    
    		//GetTsyModuleL(m_tsyModuleName);
    		m_tsyModuleName=_L("phonetsy.tsy");
    		//Load in the phone device driver
    		xAppendToLog(_L("Ph.txt"),_L("Load tsy("));
    		//xAppendToLog(_L("Ph.txt"),m_tsyModuleName);
    		//xAppendToLog(_L("Ph.txt"),_L(")\n"));
    		User::LeaveIfError(server.LoadPhoneModule(m_tsyModuleName));
    		m_eState=TCallState_TsyLoaded;
    
    		//Find the number of phones available from the tel server
    		TInt numberPhones;
    		xAppendToLog(_L("Ph.txt"),_L("enum phones()\n"));
    		User::LeaveIfError(server.EnumeratePhones(numberPhones));
    
    		//Check there are available phones
    		if(numberPhones < 1)
    		{
    			xAppendToLog(_L("Ph.txt"),_L("no phones()\n"));
    			User::Leave(KErrNotFound);
    		}
    
    		//Get info about the first available phone
    		xAppendToLog(_L("Ph.txt"),_L("get phone inf()\n"));
    		User::LeaveIfError(server.GetPhoneInfo(0,info));
    
    		//Use this info to open a connection to the phone,the phone is identified by its name
    		//CleanupClosePushL(phone);
    		xAppendToLog(_L("Ph.txt"),_L("open phone()\n"));
    		User::LeaveIfError(phone.Open(server,info.iName));
    			m_eState=TCallState_PhoneOpened;
    
    			// Activates handling				
    			CActiveScheduler::Add(this);
    }
    
    
    CFinderAsyncDialer::~CFinderAsyncDialer()
    {
    	if(m_eState>=TCallState_NewCallOpened)
    	{
    		call.DialCancel();
    		m_eState=TCallState_LineOpened;
    		call.Close();
    	}
    	if(m_eState>=TCallState_LineOpened)
    	{
    		line.Close();
    		m_eState=TCallState_PhoneOpened;
    	}
    	if(m_eState>=TCallState_PhoneOpened)
    	{
    		phone.Close();
    		m_eState=TCallState_TsyLoaded;
    	}
    	if(m_eState>=TCallState_TsyLoaded)
    	{
    		server.UnloadPhoneModule(m_tsyModuleName);
    		server.Close();
    		m_eState=TCallState_Idle;
    	}
    }
    
    void CFinderAsyncDialer::RunL()
    { 
    	xAppendToLog(_L("Ph.txt"),_L("::RunL..\n"));
    	DoCancel();
    }
    
    #ifndef __WINS__
    TBool CFinderAsyncDialer::Dial(const TDesC& aPhoneNumber)
    #else
    TBool CFinderAsyncDialer::Dial(const TDesC& /*aPhoneNumber*/)
    #endif
    {
    	if(!IsActive())
    	{
    		// At least one line ?
    		TInt	linesCount;
    		User::LeaveIfError(phone.EnumerateLines(linesCount));
    		if(linesCount<1) 
    		{
    			User::Leave(KErrNotFound);
    		}
    
    		//Get info about the first available line from the phone
    		xAppendToLog(_L("Ph.txt"),_L("get line inf\n"));
    		for(TUint32 iLine=0;iLine<(TUint32)linesCount;iLine++) 
    		{
    			User::LeaveIfError(phone.GetLineInfo(iLine,lineInfo));
    #ifdef __WINS__
    			if(lineInfo.iLineCapsFlags&RPhone::KCapsVoice) 
    			{
    				break;
    			}
    #else
    			break;
    #endif
    		}
    
    		#ifndef __WINS__
    		//Use this to open a line
    		//CleanupClosePushL(line);
    		xAppendToLog(_L("Ph.txt"),_L("open line("));
    		User::LeaveIfError(line.Open(phone,lineInfo.iName));
    		xAppendToLog(_L("Ph.txt"),lineInfo.iName);
    		xAppendToLog(_L("Ph.txt"),_L("\n"));
    		m_eState=TCallState_LineOpened;
    
    		//Open a new call on this line
    		TBuf <100> newCallName;
    		//CleanupClosePushL(call);
    		xAppendToLog(_L("Ph.txt"),_L("new call\n"));
    		xAppendToLog(_L("Ph.txt"),newCallName);
    		User::LeaveIfError(call.OpenNewCall(line,newCallName));
    
    		m_eState=TCallState_NewCallOpened;
    		//newCallName will now contain the name of the call
    		xAppendToLog(_L("Ph.txt"),_L("::dialing"));
    		xAppendToLog(_L("Ph.txt"),aPhoneNumber);
    		xAppendToLog(_L("Ph.txt"),_L("..\n"));
    		call.Dial(m_eActiveStatus,aPhoneNumber);
    		m_eState=TCallState_Dialing;
    		xAppendToLog(_L("Ph.txt"),_L("::dialed..\n"));
    		SetActive();
    		xAppendToLog(_L("Ph.txt"),_L("::setactived..\n"));
    
    		#endif
    	}
    
    	return false;
    }
    
    void CFinderAsyncDialer::DoCancel()
    {
    	if(m_eState>=TCallState_NewCallOpened)
    	{
    		call.DialCancel();
    		m_eState=TCallState_LineOpened;
    		call.Close();
    	}
    	if(m_eState>=TCallState_LineOpened)
    	{
    		m_eState=TCallState_PhoneOpened;
    		line.Close();
    	}
    }[

  4. #4
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    Re: Problem to compile series60 3rd

    I solve the wranings except for FinderBitfields.inl and FinderFileFinder.inl.
    I don't solve the error.

    Code:
    Finder_contactscommunication.cpp
    ..\\src\\Finder_contactscommunication.cpp:23:51: sendas.h: No such file or directory
    In file included from ..//inc/FinderPluginContent.h:24,
                     from ..//inc/FinderPlugin.h:33,
                     from ..//inc/FinderUtils.h:39,
                     from ..\\src\\Finder_contactscommunication.cpp:33:
    ..//inc/FinderBitfields.inl:111:48: warning: no newline at end of file
    In file included from ..//inc/FinderUtils.h:51,
                     from ..\\src\\Finder_contactscommunication.cpp:33:
    ..//inc/FinderFileFinder.inl:234:6: warning: no newline at end of file
    make[1]: *** [..\..\..\..\..\Symbian\9.1\S60_3rd\EPOC32\BUILD\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group\MOBIFINDIT_3RD\GCCE\UDEB\Finder_ContactsCommunication.o]
    Error 1
    make: *** [TARGETMOBIFINDIT_3RD] Error 2
      make -r  -f "\Symbian\9.1\S60_3rd\EPOC32\BUILD\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group\GCCE.make" FINAL CFG=UDEB VERBOSE=-s
    make -s  -C \codeMobifindit\mobifindit3rdEdition\Findit\Findit\group -f "MOBIFINDIT_ICON.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\Symbian\9.1\S60_3rd\EPOC32\BUILD\cod
    eMobifindit\mobifindit3rdEdition\Findit\Findit\group\MOBIFINDIT_ICON\GCCE TO_BLDINF=..\..\..\..\..\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group PLATFORM=GCCE CFG=UD
    EB FINAL
    make -s  -C \codeMobifindit\mobifindit3rdEdition\Findit\Findit\group -f "MOBIFINDIT_BITMAPS.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\Symbian\9.1\S60_3rd\EPOC32\BUILD\
    codeMobifindit\mobifindit3rdEdition\Findit\Findit\group\MOBIFINDIT_BITMAPS\GCCE TO_BLDINF=..\..\..\..\..\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group PLATFORM=GCCE
    CFG=UDEB FINAL

  5. #5
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Helsinki
    Posts
    109

    Re: Problem to compile series60 3rd

    Your problem is here:
    > ..\\src\\Finder_contactscommunication.cpp:23:51: sendas.h: No such file or directory

    SendAs API has changed, you should start using new SendAs2 API.

  6. #6
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    Re: Problem to compile series60 3rd

    Thanks you very much!
    I have commented the line but I will try your answer.

  7. #7
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    Re: Problem to compile series60 3rd

    It works thank you!

  8. #8
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    Re: Problem to compile series60 3rd

    Could you help me again please ...

    Code:
    ..\\src\\Ioctl.cpp: In constructor `CIoctl::CIoctl()':
    ..\\src\\Ioctl.cpp:19: error: no matching function for call to `TPckgC<TBTDevAddr>::TPckgC()'
    ..//..//..//..//..//Symbian//9.1//S60_3rd//EPOC32//include/e32cmn.h:1635: note: candidates are: TPckgC<TBTDevAddr>::TPckgC(const TPckgC<TBTDevAddr>&)
    ..//..//..//..//..//Symbian//9.1//S60_3rd//EPOC32//include/e32cmn.inl:2491: note:                 TPckgC<T>::TPckgC(const T&) [with T = TBTDevAddr]
    ..\\src\\Ioctl.cpp: In member function `void CIoctl::Start()':
    ..\\src\\Ioctl.cpp:50: error: no matching function for call to `RSocket::Ioctl(const TUint&, TRequestStatus&, TBTDevAddrPckg*, const TUint&)'
    ..//..//..//..//..//Symbian//9.1//S60_3rd//EPOC32//include/es_sock.h:781: note: candidates are: void RSocket::Ioctl(TUint, TRequestStatus&, TDes8*, TUint)
    make[1]: *** [..\..\..\..\..\Symbian\9.1\S60_3rd\EPOC32\BUILD\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group\MOBIFINDIT_3RD\GCCE\UDEB\ioctl.o] Error 1
    make: *** [TARGETMOBIFINDIT_3RD] Error 2
      make -r  -f "\Symbian\9.1\S60_3rd\EPOC32\BUILD\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group\GCCE.make" FINAL CFG=UDEB VERBOSE=-s
    make -s  -C \codeMobifindit\mobifindit3rdEdition\Findit\Findit\group -f "MOBIFINDIT_ICON.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\Symbian\9.1\S60_3rd\EPOC32\BUILD\cod
    eMobifindit\mobifindit3rdEdition\Findit\Findit\group\MOBIFINDIT_ICON\GCCE TO_BLDINF=..\..\..\..\..\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group PLATFORM=GCCE CFG=UD
    EB FINAL
    make -s  -C \codeMobifindit\mobifindit3rdEdition\Findit\Findit\group -f "MOBIFINDIT_BITMAPS.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\Symbian\9.1\S60_3rd\EPOC32\BUILD\
    codeMobifindit\mobifindit3rdEdition\Findit\Findit\group\MOBIFINDIT_BITMAPS\GCCE TO_BLDINF=..\..\..\..\..\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group PLATFORM=GCCE
    CFG=UDEB FINAL

  9. #9
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    Re: Problem to compile series60 3rd

    the Ioctl file:
    Code:
    #include <e32std.h>
    #include "Ioctl.h"
    #include "FinderUtils.h"
    
    #include <e32property.h>   // do not include this on Symbian 7
    #include <bt_subscribe.h>  // do not include this on Symbian 7
    
    /*
    ============================================================================
     Name        : ioctl.cpp
     Author      : 
     Version     :
     Copyright   : Your copyright notice
     Description : ioctl.cpp - source file
    ============================================================================
    */
    
    CIoctl::CIoctl () :	CActive (EPriorityStandard)
    {
    	// Nothing yet
    }
    
    CIoctl::~CIoctl ()
    {
    	Cancel ();
    	// Close the socket
    	iSocket.Close ();
    	iSocketServer.Close();
    }
    
    void
    CIoctl::ConstructL ()
    {
    	User::LeaveIfError(iSocketServer.Connect());
    	TProtocolDesc protocolInfo;
    	
    	// Open a socket
    	_LIT (KL2Cap,	"BTLinkManager");
    	User::LeaveIfError(iSocketServer.FindProtocol((TBuf<32>)KL2Cap, protocolInfo));
    	User::LeaveIfError(iSocket.Open (iSocketServer, KBTAddrFamily,  KSockSeqPacket, KL2CAP));
    	Print(_L("init ioctl"));
    	// Add current Active Object to Scheduler
    	CActiveScheduler::Add (this);
    }
    
    void	CIoctl::Start()
    {
    	Print(_L("start"));
    	// Get BT local address for symbian 6 and 7
    	iSocket.Ioctl(KHCILocalAddressIoctl, iStatus, &iDevAddr, KSolBtHCI); // crash
    	SetActive();
    	Print(_L("ok"));
    }
    
    /*******************************************************************\
    | Static methods																										|
    \*******************************************************************/
    
    CIoctl*
    CIoctl::NewL ()
    {
    	CIoctl* self = CIoctl::NewLC ();
    	CleanupStack::Pop (self);
    	return self;
    }
    
    CIoctl*
    CIoctl::NewLC ()
    {
    	CIoctl* self = new (ELeave) CIoctl ();
    	CleanupStack::PushL (self);
    	self->ConstructL ();
    	return self;
    }
    
    /*******************************************************************\
    | From CActive  																										|
    \*******************************************************************/
    
    /*
     *	
     */
    
    void
    CIoctl::DoCancel ()
    {
    	iSocket.CancelIoctl ();
    }
    
    /*
     *	
     */
    
    void	ConvertAddress (const TDesC8& aAddress, TDes& aResult)
    {
    	/*
    	aResult.Format (_L("%02X:%02X:%02X:%02X:%02X:%02X"),
    									aAddress[0], aAddress[1], aAddress[2],
    									aAddress[3], aAddress[4], aAddress[5]);
    	*/
    
    	aResult.Format (_L("%02X:%02X:%02X:%02X:%02X:%02X"),
    									aAddress[0], aAddress[1], aAddress[2],
    									aAddress[3], aAddress[4], aAddress[5]);
    }
    
    /*
     *	Get BT local address for symbian 8
     */
    
    void
    CIoctl::RetrieveGeneral()
    {
    	TInt errorStatus = KErrNone;
    
    	// Retrieve address
    	TBuf8<6> address (KNullDesC8);
    	errorStatus = RProperty::Get (KPropertyUidBluetoothCategory, KPropertyKeyBluetoothLocalDeviceAddress, address);
    	if (errorStatus == KErrNone)
    	{
    		ConvertAddress (address, iBTAddress);
    	}
    
    	TConfig config;
    	ReadConfigL(config);
    	config.btAddress = iBTAddress;
    	Print(_L("Save bt address %S"), &config.btAddress);
    	SaveConfigL(config);
    }
    
    /*
    *	
    */
    
    void
    CIoctl::RunL ()
    {
    	Print(_L("runL %d"), iStatus.Int());
    	if(iStatus.Int() != KErrNone)
    	{
    		RetrieveGeneral();
    		return;
    	}
    
    	ConvertAddress (iDevAddr ().Des (), iBTAddress);
    	TConfig config;
    	ReadConfigL(config);
    	config.btAddress = iBTAddress;
    	Print(_L("Save bt address %S"), &config.btAddress);
    	SaveConfigL(config);
    }
    Thanks...

  10. #10
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    Re: Problem to compile series60 3rd

    I replace TBTDevAddrPckg by TBTDevAddr in Ioctl.h.
    Now I have these errors:

    Code:
    ..\\src\\Ioctl.cpp: In member function `void CIoctl::Start()':
    ..\\src\\Ioctl.cpp:50: error: no matching function for call to `RSocket::Ioctl(const TUint&, TRequestStatus&, TBTDevAddr*, const TUint&)'
    ..//..//..//..//..//Symbian//9.1//S60_3rd//EPOC32//include/es_sock.h:781: note: candidates are: void RSocket::Ioctl(TUint, TRequestStatus&, TDes8*, TUint)
    ..\\src\\Ioctl.cpp: In member function `virtual void CIoctl::RunL()':
    ..\\src\\Ioctl.cpp:145: error: no match for call to `(TBTDevAddr) ()'
    make[1]: *** [..\..\..\..\..\Symbian\9.1\S60_3rd\EPOC32\BUILD\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group\MOBIFINDIT_3RD\GCCE\UDEB\ioctl.o] Error 1
    make: *** [TARGETMOBIFINDIT_3RD] Error 2
      make -r  -f "\Symbian\9.1\S60_3rd\EPOC32\BUILD\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group\GCCE.make" FINAL CFG=UDEB VERBOSE=-s
    make -s  -C \codeMobifindit\mobifindit3rdEdition\Findit\Findit\group -f "MOBIFINDIT_ICON.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\Symbian\9.1\S60_3rd\EPOC32\BUILD\cod
    eMobifindit\mobifindit3rdEdition\Findit\Findit\group\MOBIFINDIT_ICON\GCCE TO_BLDINF=..\..\..\..\..\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group PLATFORM=GCCE CFG=UD
    EB FINAL
    make -s  -C \codeMobifindit\mobifindit3rdEdition\Findit\Findit\group -f "MOBIFINDIT_BITMAPS.MK" TO_ROOT=..\..\..\..\.. EPOCBLD=..\..\..\..\..\Symbian\9.1\S60_3rd\EPOC32\BUILD\
    codeMobifindit\mobifindit3rdEdition\Findit\Findit\group\MOBIFINDIT_BITMAPS\GCCE TO_BLDINF=..\..\..\..\..\codeMobifindit\mobifindit3rdEdition\Findit\Findit\group PLATFORM=GCCE
    CFG=UDEB FINAL

Similar Threads

  1. rcomp.exe and CAknMessageQueryDialog problem (S60 3rd)
    By jyrkiettila in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-04-10, 11:20
  2. GCCE compile with CodeWarrior - a link problem
    By HennaI in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 4
    Last Post: 2006-11-21, 22:33
  3. Problem found in Symbian 3rd edition SDK Maintainence Release!
    By khurshed79 in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2006-07-05, 12:32
  4. Problem in Timer Request Handling on Series60 V1.2
    By mishrasaurabh in forum Symbian
    Replies: 0
    Last Post: 2004-01-23, 06:26
  5. Problem in Timer Request Handling on Series60 V1.2
    By mishrasaurabh in forum Symbian
    Replies: 0
    Last Post: 2004-01-23, 06:19

Posting Permissions

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