コード例 #1
0
void CMscFileSession::DispatchMessageL( const RMessage2& aMessage )
    {
    switch (aMessage.Function())
        {
        case EMscFileSetupLu:
            SetupLogicalUnitL( aMessage );
            break;
            
        case EMscFileStart:
            StartL( aMessage );
            break;
            
        case EMscFileStop:
            LEAVE_IF_ERROR( Stop() );
            break;
            
        case EMscFileShutdown:
            LEAVE_IF_ERROR( Shutdown() );
            break;

        default:
            aMessage.Panic( KUsbMsCliPncCat, EUsbMsPanicIllegalIPC );
            break;
        }

    }
コード例 #2
0
void SpeedDialConfigController::InitTitleL()
{
	m_title_edit = m_dialog->GetWidgetCollection()->GetL<QuickEdit>("edit_title");

	LEAVE_IF_ERROR(GetBinder()->Connect(*m_title_edit, m_title));
	LEAVE_IF_ERROR(m_title_edit->AddOpWidgetListener(*this));
}
コード例 #3
0
void SpeedDialConfigController::InitExtensionViewsL()
{
	GenericGrid* grid = m_dialog->GetWidgetCollection()->GetL<QuickGrid>("suggestions_grid");

	for (unsigned i = 0; i < ARRAY_SIZE(m_extension_views); ++i)
	{
		ANCHORD(OpString8, composite_name);
		LEAVE_IF_ERROR(composite_name.AppendFormat("Extension%d", i));
		QuickComposite* composite = m_dialog->GetWidgetCollection()->GetL<QuickComposite>(composite_name);
		composite->AddOpWidgetListener(*this);

		ANCHORD(OpString8, button_name);
		LEAVE_IF_ERROR(button_name.AppendFormat("ExtensionButton%d", i));
		QuickButton* button = m_dialog->GetWidgetCollection()->GetL<QuickButton>(button_name);
		m_extension_views[i].m_button = button;
		button->GetOpWidget()->SetButtonTypeAndStyle(OpButton::TYPE_CUSTOM, OpButton::STYLE_IMAGE);
		button->GetOpWidget()->GetBorderSkin()->SetImage("Speed Dial Configuration Dialog Image");
		button->GetOpWidget()->SetFixedImage(TRUE);
		grid->RegisterToButtonGroup(button->GetOpWidget());
		composite->GetOpWidget()->SetActionButton(button->GetOpWidget());

		ANCHORD(OpString8, name_name);
		LEAVE_IF_ERROR(name_name.AppendFormat("ExtensionName%d", i));
		QuickButton* name = m_dialog->GetWidgetCollection()->GetL<QuickButton>(name_name);
		m_extension_views[i].m_name = name;
		name->GetOpWidget()->SetButtonTypeAndStyle(OpButton::TYPE_CUSTOM, OpButton::STYLE_IMAGE);
		name->GetOpWidget()->SetJustify(JUSTIFY_CENTER, TRUE);
		name->GetOpWidget()->SetEllipsis(g_pcui->GetIntegerPref(
					PrefsCollectionUI::EllipsisInCenter) == 1 ? ELLIPSIS_CENTER : ELLIPSIS_END);
		name->GetOpWidget()->SetRelativeSystemFontSize(95);
		name->GetOpWidget()->GetBorderSkin()->SetImage("Speed Dial Configuration Dialog Extension Title");
	}
}
コード例 #4
0
void ExtensionInstallGenericController::InitControlsL()
{
	if (OpStatus::IsSuccess(ExtensionUtils::GetExtensionIcon(m_icon_img, m_gclass)))
	{
		OP_ASSERT(!m_icon_img.IsEmpty());
		QuickIcon* icon_widget = m_widgets->GetL<QuickIcon>("Extension_icon");
		icon_widget->SetBitmapImage(m_icon_img);
	}

	QuickLabel* version_widget = m_widgets->GetL<QuickLabel>("Extension_version");
	ANCHORD(OpString, versionString);
	ANCHORD(OpString, gver);

	g_languageManager->GetStringL(Str::S_CRYPTO_VERSION, versionString);
	if (OpStatus::IsError(m_gclass->GetGadgetVersion(gver)) || gver.IsEmpty())
	{
		version_widget->Hide();
	}
	else
	{
		LEAVE_IF_ERROR(versionString.AppendFormat(UNI_L(" %s"), gver.CStr()));
		LEAVE_IF_ERROR(version_widget->SetText(versionString));
	}

	ANCHORD(OpString, extension_name);
	LEAVE_IF_ERROR(m_gclass->GetGadgetName(extension_name));
	m_widgets->GetL<QuickLabel>("Extension_title")->SetText(extension_name);

	LEAVE_IF_ERROR(SetWarningAccessLevel());
}
コード例 #5
0
void OpConsolePrefsHelper::SetupLoggerL()
{
	PrefsCollectionCore *pccore = g_pccore;
	if (pccore->GetIntegerPref(PrefsCollectionCore::UseErrorLog))
	{
		const OpFile *logfile =
			g_pcfiles->GetFile(PrefsCollectionFiles::ConsoleErrorLogName);

		// Parse the filter string
		OpStackAutoPtr<OpConsoleFilter>
			new_filter(OP_NEW_L(OpConsoleFilter, (OpConsoleEngine::DoNotShow)));
#ifdef CON_ENABLE_SERIALIZATION
		LEAVE_IF_ERROR(new_filter->SetFilter(
			pccore->GetStringPref(PrefsCollectionCore::ErrorLogFilter),
			OpConsoleEngine::Information));
#else
		// Just enable for JavaScript if we lack serialization support.
		LEAVE_IF_ERROR(new_filter->SetOrReplace(OpConsoleEngine::EcmaScript,
			                                    OpConsoleEngine::Information));
#endif

		// Set up new logger
		OpStackAutoPtr<OpConsoleLogger> new_logger(OP_NEW_L(OpConsoleLogger, ()));
		new_logger->ConstructL(logfile, new_filter.get());

		// Replace old logger with the new one
		OP_DELETE(m_logger);
		m_logger = new_logger.release();
	}
	else
	{
コード例 #6
0
static void StopLogServerL()
	{
	static RLogTestSession logServSession;
	//this function doesn't have any effect on UREL builds as LogEng server doesn't 
	//support the transient mode in UREL builds	
	//Used for LogEng server side heap failure testing.
	TInt error = KErrNone;
	  
	if(!logServSession.Handle())
		{
		error = logServSession.Connect();
		}
	  
	// Is the server running?
	if(error == KErrNotFound)
		{
		return;
		}
	LEAVE_IF_ERROR(error);
	  
	// Make the server transient
	TInt p0 = 1;
	TIpcArgs  ipcArgs(p0);
	LEAVE_IF_ERROR(logServSession.Send(ELogMakeTransient, ipcArgs));
	  
	logServSession.Close();
	  
	User::After(6 * 1000000); // Enough time for the server to exit
	}
コード例 #7
0
ファイル: t_dbood.cpp プロジェクト: cdaffara/symbiandump-os2
/**
@SYMTestCaseID          SYSLIB-DBMS-CT-0649
@SYMTestCaseDesc        OOD tests with two DBMS sessions.
@SYMTestPriority        Medium
@SYMTestActions         The test actually checks that the DBMS server is in a stable state, when there is more
						than one RDbs session and a shared database is accessed.
						The first check is that the shared database can be accessed without any problem through
						any of the sessions: first or second.
						Then the second session is closed and the shared database is accessed
						through the first DBMS session - the operations should not fail.
@SYMTestExpectedResults Test must not fail
@SYMREQ                 REQ0000
*/
static void TwoSessTestL()
    {
    //Create session1, open a shared database, open a shared table through session 1
    RDbs dbSess1;
    CleanupClosePushL(dbSess1);
    LEAVE_IF_ERROR(dbSess1.Connect());

    RDbNamedDatabase db1;
    CleanupClosePushL(db1);
	TInt err = db1.Open(dbSess1, KTestDatabase);
	TEST2(err, KErrNone);

	RDbTable tbl1;
	CleanupClosePushL(tbl1);
	TEST2(tbl1.Open(db1, KTestTableName, RDbRowSet::EUpdatable), KErrNone);

    //Create session2, open shared database, open shared table through session 2
    RDbs dbSess2;
    CleanupClosePushL(dbSess2);
    LEAVE_IF_ERROR(dbSess2.Connect());

    RDbNamedDatabase db2;
    CleanupClosePushL(db2);
	err = db2.Open(dbSess2, KTestDatabase);
	TEST2(err, KErrNone);

	RDbTable tbl2;
	CleanupClosePushL(tbl2);
	TEST2(tbl2.Open(db2, KTestTableName, RDbRowSet::EUpdatable), KErrNone);

    //Here we have two sessions and two instances of RDbNamedDatabase type, which
    //operate on a shared database. Insert a record through the sessions.

	tbl1.InsertL();
	tbl1.SetColL(2, _L8("--------------------------1----------------------------------------"));
	tbl1.PutL();

	tbl2.InsertL();
	tbl2.SetColL(2, _L8("========================2======================================"));
	tbl2.PutL();

    //Close the second session. It should be able to access the shared database via the
    //first session.

	CleanupStack::PopAndDestroy(&tbl2);
    CleanupStack::PopAndDestroy(&db2);
    CleanupStack::PopAndDestroy(&dbSess2);

    //Try to access again the shared database.
	tbl1.InsertL();
	tbl1.SetColL(2, _L8("+++++++++++++++++++++++++++++++++++3++++++++++++++++++++++++++++++++++++++++++"));
	tbl1.PutL();

	CleanupStack::PopAndDestroy(&tbl1);
    CleanupStack::PopAndDestroy(&db1);
    CleanupStack::PopAndDestroy(&dbSess1);
    }
コード例 #8
0
ファイル: t_dbood.cpp プロジェクト: cdaffara/symbiandump-os2
//Creates large data file with aSize size (in bytes).
static void DoCreateLargeFileL(const TDesC& aPath, TInt aSize)
	{
	RFile file;
	CleanupClosePushL(file);
	LEAVE_IF_ERROR(file.Replace(TheFs, aPath, EFileRead | EFileWrite));
	FillLargeDataFileL(file, aSize);
	LEAVE_IF_ERROR(file.Flush());
	CleanupStack::PopAndDestroy(&file);
	}
コード例 #9
0
void CBtmcSignal::ConstructL()
    {
    TRACE_FUNC_ENTRY
    LEAVE_IF_ERROR(iServer.Connect());
    iServer.LoadPhoneModule(KMmTsyModuleName);
    LEAVE_IF_ERROR(iPhone.Open(iServer, KMmTsyPhoneName));
    iPhone.GetSignalStrength(iStatus, iDbm, iBars);
    SetActive();
    TRACE_FUNC_EXIT
    }
コード例 #10
0
ファイル: webfeedstorage.cpp プロジェクト: prestocore/browser
void
WriteBuffer::InitL(const uni_char *file_name)
{
	m_max_len = 1024;
	m_used = 0;
	m_written = 0;
	m_buffer = OP_NEWA_L(char, m_max_len);

	LEAVE_IF_ERROR(m_file.Construct(file_name, OPFILE_TEMP_FOLDER));
	LEAVE_IF_ERROR(m_file.Open(OPFILE_WRITE | OPFILE_TEXT));
}
コード例 #11
0
void SpeedDialConfigController::InitAddressL()
{
	m_address_drop_down = m_dialog->GetWidgetCollection()->GetL<QuickAddressDropDown>("address_inputbox");

	LEAVE_IF_ERROR(GetBinder()->Connect(*m_address_drop_down, m_address));
	LEAVE_IF_ERROR(m_address_drop_down->AddOpWidgetListener(*this));
	LEAVE_IF_ERROR(m_address.Subscribe(
				MAKE_DELEGATE(*this, &SpeedDialConfigController::OnAddressChanged)));

	OpAddressDropDown::InitInfo info;
	info.m_max_lines = 10;
	m_address_drop_down->GetOpWidget()->InitAddressDropDown(info);
}
コード例 #12
0
void
XMLInternalParser::LoadEntity (XMLDoctype::Entity *entity, ParseContext context)
{
  XMLDataSource *source;

  if (!datasource_handler)
    {
      skip_remaining_doctype = TRUE;
      return;
    }

  if (entity->GetValue ())
    LEAVE_IF_ERROR (datasource_handler->CreateInternalDataSource (source, entity->GetValue (), entity->GetValueLength ()));
  else
    {
      source = 0;

#ifdef XML_SUPPORT_EXTERNAL_ENTITIES
      if (load_external_entities)
        LEAVE_IF_ERROR (datasource_handler->CreateExternalDataSource (source, entity->GetPubid (), entity->GetSystem (), entity->GetBaseURL ()));

      if (!source)
#endif // XML_SUPPORT_EXTERNAL_ENTITIES
        {
          skip_remaining_doctype = TRUE;
          return;
        }
    }

  OpStackAutoPtr<XMLDataSource> anchor (source);

  if (source)
    {
      XMLBuffer *buffer = OP_NEW_L(XMLBuffer, (source, version == XMLVERSION_1_1));
      buffer->Initialize (32768);
      source->SetBuffer (buffer);

      XMLInternalParserState *state = OP_NEW_L(XMLInternalParserState, ());
      state->context = context;
      state->entity = entity;
      source->SetParserState (state);
      source->SetNextSource (current_source);

      blocking_source = source;

      anchor.release ();
      LEAVE (PARSE_RESULT_BLOCK);
    }
}
コード例 #13
0
ファイル: webfeedentry.cpp プロジェクト: prestocore/browser
void WebFeedContentElement::WriteAsStrippedHTMLL(URL& out_url) const
{
	if (!HasValue())
		return;

	if (!IsMarkup())  // no markup to strip
	{
		WriteAsHTMLL(out_url);
		return;
	}

	OpString stripped; ANCHOR(OpString, stripped);
	LEAVE_IF_ERROR(WebFeedUtil::StripTags((uni_char*)m_value, stripped));
	LEAVE_IF_ERROR(out_url.WriteDocumentData(URL::KNormal, stripped));
}
コード例 #14
0
//See TestUtils::AddEventL(). Adds an event to the LogEng database.
//The event type is set to be: KLogCallEventTypeUid.
//Return: the Id of the added event
static TInt AddEventL()
	{
	TheTestScheduler = new (ELeave) CActiveScheduler;
	CleanupStack::PushL(TheTestScheduler);
	CActiveScheduler::Install(TheTestScheduler);

	CLogClient* client = CLogClient::NewL(theFs);
	CleanupStack::PushL(client);

	CTestActive* active = new(ELeave)CTestActive();
	CleanupStack::PushL(active);

	CLogEvent* event = CLogEvent::NewL();
	CleanupStack::PushL(event);
	
	event->SetEventType(KLogCallEventTypeUid);

	active->StartL();
	client->AddEvent(*event, active->iStatus);
	CActiveScheduler::Start();
	LEAVE_IF_ERROR(active->iStatus.Int());
    TLogId eventId = event->Id();
	
	CleanupStack::PopAndDestroy(4); // scheduler, client, active, event
	TheTestScheduler = NULL;
	return eventId;
	}
コード例 #15
0
//See TestUtils::AddEventTypeL(). Adds an event type to the LogEng database.
static void AddEventTypeL()
	{
	TheTestScheduler = new (ELeave) CActiveScheduler;
	CleanupStack::PushL(TheTestScheduler);
	CActiveScheduler::Install(TheTestScheduler);

	CLogClient* client = CLogClient::NewL(theFs);
	CleanupStack::PushL(client);

	CTestActive* active = new(ELeave)CTestActive();
	CleanupStack::PushL(active);

	CLogEventType* type = CLogEventType::NewL();
	CleanupStack::PushL(type);

	type->SetUid(KTestEventUid);
	type->SetDescription(KTestEventDesc1);
	type->SetLoggingEnabled(ETrue);

	client->AddEventType(*type, active->iStatus);
	
	active->StartL();
	CActiveScheduler::Start();
	LEAVE_IF_ERROR(active->iStatus.Int());
	
	CleanupStack::PopAndDestroy(4); // scheduler, client, active, type
	TheTestScheduler = NULL;
	}
コード例 #16
0
//See TestUtils::TestInvalidSchemaL(). Re-creates the LogEng database and checkes whether a new 
//LogEng connection can be established (by creating a CLogClient object).
static void TestInvalidSchemaL()
	{
	TheTestScheduler = new (ELeave) CActiveScheduler;
	CleanupStack::PushL( TheTestScheduler );
	CActiveScheduler::Install( TheTestScheduler );

   	//Reseting of log engine databse is done via its backup server.  This seems a 
   	//bit odd.  Perhaps write a CLogClient API that does it?
   	//Create backup session wrapper
   	CBaBackupSessionWrapper* backup = CBaBackupSessionWrapper::NewL();
   	CleanupStack::PushL(backup);
   
   	//This eventually calls CLogBackup::ChangeFileLockL(..) which closes the database 
   	//file and notifies all handles to that file that it has closed.
   	backup->CloseFileL(KLogDatabaseName, MBackupObserver::EReleaseLockNoAccess);
 	User::After(1000000);
   	
   	//Since the log engine database file is closed we can replace it.   
   	//Once this file is deleted, the backup server notices this and attempts to reopen 
   	//the database.  Since the file is deleted a default database is created instead.
    RDbNamedDatabase database;
	TInt err = database.Replace(theFs, KLogDatabaseName);
	database.Close();
	LEAVE_IF_ERROR(err);

	// The following will leave if there is a problem
	CLogClient* client = CLogClient::NewL(theFs);
	delete client;
	
	CleanupStack::PopAndDestroy(2); // scheduler + backup
	TheTestScheduler = NULL;
	}
コード例 #17
0
ファイル: commcleaner.cpp プロジェクト: prestocore/browser
void CommCleaner::ConstructL()
{
	posted_message = FALSE;
	OP_ASSERT(NULL != g_main_message_handler);
	LEAVE_IF_ERROR(g_main_message_handler->SetCallBack(this, MSG_COMM_CLEANER, 0));
	//postL();
}
コード例 #18
0
/* static */ void
ES_DebugMessagePart::SetValueL(ES_DebugValue &stored_value, const ES_DebugValue &value)
{
	stored_value = value;

	if (value.type == VALUE_STRING)
	{
		if (value.is_8bit)
		{
			char *new_value = 0;
			SetStrL(new_value, value.value.string8.value, value.value.string8.length);
			stored_value.value.string8.value = new_value;
		}
		else
		{
			uni_char *new_value = 0;
			LEAVE_IF_ERROR(UniSetStrN(new_value, value.value.string16.value, value.value.string16.length));
			stored_value.value.string16.value = new_value;
		}
	}
	else if (value.type == VALUE_OBJECT)
		stored_value.value.object.info = NULL;

	stored_value.owns_value = TRUE;
}
コード例 #19
0
ファイル: mul_par_cs.cpp プロジェクト: prestocore/browser
void Multipart_CacheStorage::ConstructL(Cache_Storage * initial_storage, OpStringS8 &content_encoding)
{
	StreamCache_Storage::ConstructL(initial_storage, content_encoding);

	desc = StreamCache_Storage::GetDescriptor(NULL, TRUE, FALSE, NULL);
	if(GetContentEncoding().HasContent())
	{
		OpStackAutoPtr<URL_DataDescriptor> desc1(OP_NEW_L(URL_DataDescriptor, (url, NULL)));
		LEAVE_IF_ERROR(desc1->Init(TRUE));
#ifdef _HTTP_COMPRESS
		desc1->SetupContentDecodingL(GetContentEncoding().CStr());
#endif
		
		if(desc1->GetFirstDecoder() != NULL)
		{
			desc1->SetSubDescriptor(desc);
			desc = desc1.release();
			AddDescriptor(desc);
		}
		// Auto cleanup
	}

	if(desc == NULL)
		LEAVE(OpStatus::ERR_NULL_POINTER);
}
コード例 #20
0
void PluginEULADialog::InitL()
{
	SetListener(this);
	LEAVE_IF_ERROR(SetDialog("Plugin EULA Dialog"));

	m_loading_icon = m_dialog->GetWidgetCollection()->GetL<QuickIcon>("plugin_eula_loading_icon");

	QuickBrowserView* quick_eula_browser_view = m_dialog->GetWidgetCollection()->GetL<QuickBrowserView>("plugin_eula_browser");
	m_browser_view = quick_eula_browser_view->GetOpBrowserView();

	m_license_label = m_dialog->GetWidgetCollection()->GetL<QuickLabel>("plugin_eula_license_label");

	LEAVE_IF_ERROR(m_browser_view->AddListener(this));

	m_eula_failed = false;
}
コード例 #21
0
ファイル: webfeedentry.cpp プロジェクト: prestocore/browser
void WebFeedContentElement::WriteAsHTMLL(URL& out_url) const
{
	if (HasValue())
	{
		if (IsPlainText())
			LEAVE_IF_ERROR(out_url.WriteDocumentData(URL::KHTMLify, (uni_char*)m_value, m_value_length / sizeof(uni_char)));
		else if (IsMarkup())
		{
			OpString stripped_html; ANCHOR(OpString, stripped_html);
			WebFeedUtil::StripTags((const uni_char*)m_value, stripped_html, UNI_L("style"), TRUE);
			LEAVE_IF_ERROR(out_url.WriteDocumentData(URL::KNormal, stripped_html, stripped_html.Length()));
		}
		else
			OP_ASSERT(!"What to do, what to do, with this strange content type");
	}
}
コード例 #22
0
void CHFPAtCmdHandler::ConstructL()
    {
    TRACE_FUNC_ENTRY
    
    CleanupClosePushL( iATExtClient );
    TInt err = iATExtClient.Connect(EHfpATExtension, KHFPAtCmd);
    LEAVE_IF_ERROR(err)
    
    // Create the plugin handlers
    CreatePluginHandlersL();
    // Create the listeners
    CHFPAtEcomListen* ecomListen = CHFPAtEcomListen::NewLC( &iATExtClient, this );
    ecomListen->IssueRequest();
    
    CleanupStack::Pop( ecomListen );
    CleanupStack::Pop( &iATExtClient );
    iEcomListen = ecomListen;
    
    StartUrc();
    iCommander = CBtmcActive::NewL(*this, CActive::EPriorityStandard, EHandleCommandRequest);
    iCmdBuffer.CreateL(KDefaultCmdBufLength);
    iRecvBuffer = new (ELeave) TBuf8<KDefaultCmdBufLength>();
    iReplyBuffer = new (ELeave) TBuf8<KDefaultCmdBufLength>();
    iSystemReply.CreateL(KDefaultUrcBufLength);
    TRACE_FUNC_EXIT
    }
コード例 #23
0
/* virtual */ void
ES_RemoteDebugConnection::OnSocketConnected(OpSocket* socket)
{
	OP_ASSERT(state == CONNECTING);

	state = CONNECTED;
	LEAVE_IF_ERROR(Connected());
}
コード例 #24
0
HBufC8 *Cdmatest::LoadFileLC( const TDesC &aFileName, TDataType &aType )	
	{
	RFs fs ;
	LEAVE_IF_ERROR( fs.Connect(), _L( "Could not connect fileserver: %d"  ) );
	
	CleanupClosePushL( fs );
	RFile file ;
	LEAVE_IF_ERROR( file.Open(fs,aFileName,EFileRead), _L( "Could not open file: %d" ) );
	
	
	
	CleanupClosePushL( file );
	TInt dataSize ;
	LEAVE_IF_ERROR( file.Size( dataSize ), _L( "Could not get file size: %d" ) );
	HBufC8 *nodedata = HBufC8::NewL ( dataSize );
	CleanupStack::PushL( nodedata );
	TPtr8 nodedataptr( nodedata->Des() );
	LEAVE_IF_ERROR( file.Read( nodedataptr ), _L( "Could not read file: %d" ) );
	TDataRecognitionResult aDataType;
	RApaLsSession ls ;
	TInt err( ls.Connect() );
	if ( err == KErrNone )
		{
		CleanupClosePushL( ls );
		err = ls.RecognizeData(aFileName, nodedataptr, aDataType)  ;
		if ( err == KErrNone )
			{
			aType = aDataType.iDataType;
			}
		else
			{
			iLog->Log( _L("LoadFileLC: WARNING Failed to get type: %d" ), err );
			aType = TDataType( KDefaultType );
			}	
		CleanupStack::PopAndDestroy( &ls ); 
		}
	else
		{
		iLog->Log( _L("LoadFileLC: WARNING Failed to connect rapalssession: %d" ), err );
		}	
	CleanupStack::Pop( nodedata );
	CleanupStack::PopAndDestroy( &file ); 
	CleanupStack::PopAndDestroy( &fs ); 
	CleanupStack::PushL( nodedata );
	return nodedata ;
	}
コード例 #25
0
void SpeedDialConfigController::InitL()
{
	OP_ASSERT(m_thumbnail != NULL);
	if (!m_thumbnail)
		LEAVE(OpStatus::ERR_NULL_POINTER);

	m_dialog = OP_NEW_L(QuickOverlayDialog, ());
	OP_ASSERT(m_thumbnail->GetParentOpSpeedDial());
	m_dialog->SetBoundingWidget(*m_thumbnail->GetParentOpSpeedDial());
	m_dialog->SetAnimationType(QuickOverlayDialog::DIALOG_ANIMATION_FADE);

	m_dialog->SetResizeOnContentChange(FALSE);

	if (m_mode == ADD)
	{
		LEAVE_IF_ERROR(SetDialog("Speed Dial Configuration Dialog", m_dialog));
	}
	else
	{
		LEAVE_IF_ERROR(SetDialog("Speed Dial Edit Dialog", m_dialog));
	}

	InitAddressL();

	if (m_mode == ADD)
	{
		InitPageViewsL();
		InitExtensionViewsL();

		// we want to request enough suggestions to fill all slots;
		// it's not a problem if we request too many ;)
		unsigned num = SUGGESTION_COUNT +
			g_desktop_extensions_manager->GetExtensionsCount();
		LEAVE_IF_ERROR(RequestExtensionsFeed(num));
	}
	else
	{
		InitTitleL();
	}

	LEAVE_IF_ERROR(SetThumbnail(*m_thumbnail));

	if (m_mode == ADD)
		g_desktop_extensions_manager->AddInstallListener(this);
}
コード例 #26
0
/**
@SYMTestCaseID          SYSLIB-LOGENG-CT-1021
@SYMTestCaseDesc	    Tests for killing the server
                        Tests for RProcess::Kill(),RThread::Kill() function
@SYMTestPriority 	    High
@SYMTestActions  	    If EKA2 find the process and kill it, for EKA1 find thread and kill it
@SYMTestExpectedResults Test must not fail
@SYMREQ                 REQ0000
*/	
LOCAL_C void TestKillServerL()
	{	
	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-1021 Before Killing Server "));
	User::After(2000000);
	
	// for EKA2 find process and Kill
	// Note: this needs CAPABILITY PowerMgmt
	TFindProcess findProcess(SERVER_NAME);
	TFullName result;
	LEAVE_IF_ERROR( findProcess.Next(result) );
	
	RProcess server;
	LEAVE_IF_ERROR( server.Open(findProcess, EOwnerProcess) );
	server.Kill(0);		
 
	TheTest.Next(_L("Server is Killed"));
	User::After(2000000);
	}
コード例 #27
0
ファイル: webfeedstorage.cpp プロジェクト: prestocore/browser
void
WebFeedStorage::SaveStoreL(WebFeedsAPI_impl* api_impl)
{
	OP_ASSERT(api_impl);
	if (!api_impl)
		return;

	WriteBuffer w_buf; ANCHOR(WriteBuffer, w_buf);
	w_buf.InitL(UNI_L("tmp.storage"));

	api_impl->SaveL(w_buf);
	w_buf.Flush();
	w_buf.GetFile().Close();

	OpFile old_file; ANCHOR(OpFile, old_file);
	LEAVE_IF_ERROR(old_file.Construct(FEED_STORE_FILE, OPFILE_WEBFEEDS_FOLDER));
	LEAVE_IF_ERROR(old_file.SafeReplace(&w_buf.GetFile()));
}
コード例 #28
0
void ExtensionInstallGenericController::InitL()
{
	LEAVE_IF_ERROR(SetDialog("Extension Install Dialog"));
	m_widgets = m_dialog->GetWidgetCollection();
	
	m_dialog_mode = ExtensionUtils::GetAccessWindowType(m_gclass);

	return InitControlsL();
}
コード例 #29
0
ファイル: p11_man.cpp プロジェクト: prestocore/browser
void SSL_ExternalKeyManager::SetUpMasterL(OpStringC type, OpStringC path, uni_char **arguments, int max_args)
{

#if defined(_SSL_USE_PKCS11_)
	OpStackAutoPtr<OpDLL> dll = NULL;
	OpStackAutoPtr<SmartCard_Master > driver = NULL;
	OpDLL *temp_dll=NULL;

	LEAVE_IF_ERROR(g_factory->CreateOpDLL(&temp_dll));
	dll.reset(temp_dll);
	temp_dll = NULL;

	LEAVE_IF_ERROR(dll->Load(path));

	OP_ASSERT(dll->IsLoaded());

#ifdef _SSL_USE_PKCS11_
	if(type.CompareI(UNI_L("CryptoKi")) == 0 || type.CompareI(UNI_L("pkcs11")) == 0 )
	{
		driver.reset(CreatePKCS11_MasterL(dll.get()));
	}
#endif

	if(driver.get() != NULL)
	{
		dll.release();
		OP_STATUS op_err = driver->Init(arguments, max_args);

		if(op_err == OpSmartcardStatus::UNSUPPORTED_VERSION)
		{
			driver.reset(); // Unsupported version: Delete it.
			return; 
		}
		else if(OpStatus::IsError(op_err))
			LEAVE(op_err);

		driver->Into(&smartcard_masters);
		driver.release();
	}

	dll.reset();
	driver.reset();
#endif
}
コード例 #30
0
void CollectionNavigationPane::InitL()
{
	TypedObjectCollection widgets_collection;
	LEAVE_IF_ERROR(WidgetContext::CreateQuickWidget("Collection Manager NavigationPane", m_navigation_pane_controller, widgets_collection));
	m_navigation_pane_controller->SetContainer(this);
	m_navigation_pane_controller->SetParentOpWidget(this);

	SetupTreeviewWidgetL(widgets_collection);
	SetupFindWidgetL(widgets_collection);
}