亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? nameswapao.cpp

?? 這一個(gè)應(yīng)用于symbian 操作系統(tǒng)
?? CPP
字號(hào):
/*
    This file is part of NameSwap.

    NameSwap is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    NameSwap is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with NameSwap; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

	Copyright (C) 2002 Ashley Montanaro.
*/

#include <NameSwap.rsg>
#include "NameSwap.hrh"
#include "NameSwapAO.h"

// This active object is responsible for swapping names when "swap all" is selected
// by the user. It's required because progress dialogs use an active object which
// needs to be scheduled. All the operations on the contacts database are synchronous,
// so this object just reschedules itself after swapping each contact's names.

CNameSwapAO::CNameSwapAO() : CActive(EPriorityIdle)
	{
	CActiveScheduler::Add(this);
	}

CNameSwapAO::~CNameSwapAO()
	{
	delete iDatabase;
	}

void CNameSwapAO::StartL()
	{
	// Open the database and get all the contacts into a list.
	iDatabase = CContactDatabase::OpenL();
	iContacts = iDatabase->SortedItemsL();

	// Create the progress dialog, specifying that it should be displayed immediately.
	// If this flag isn't passed, it doesn't seem to display at all (?)
	iProgressDialog = new (ELeave) CAknProgressDialog(
                            (REINTERPRET_CAST(CEikDialog**,&iProgressDialog)), ETrue);
	iProgressDialog->PrepareLC(R_PROGRESS_NOTE);

	// Get a handle to the progress info. Must be done after PrepareLC().
    iProgressInfo = iProgressDialog->GetProgressInfoL();

	// Tell the dialog to notify us if the user presses "Cancel".
	iProgressDialog->SetCallback(this);

	// Action!
	iProgressDialog->RunLD();

	iContactIndex = 0;

	// If there are actually any contacts in the DB, start by swapping the first one.
	if (iContacts->Count() > 0)
		{
		SwapContactL(iContactIndex);
		iProgressInfo->SetFinalValue(iContacts->Count() - 1);
		}

	// Reschedule ourselves.
	SetActive();
	TRequestStatus* status = &iStatus;
	User::RequestComplete(status, KErrNone);
	}

void CNameSwapAO::RunL()
	{
	// If there's been an error, bail out straight away.
	User::LeaveIfError(iStatus.Int());

	// Update the progress information.
	iProgressInfo->IncrementAndDraw(1);

	iContactIndex++;

	if (iContactIndex < iContacts->Count())
		{
		// Swap the next contact.
		SwapContactL(iContactIndex);

		// Synchronously compress the database.
		iDatabase->CompactL();

		// Reschedule ourselves.
		SetActive();
		TRequestStatus* status = &iStatus;
		User::RequestComplete(status, KErrNone);
		}
	else
		{
		// Get rid of the progress dialog (deletes it as well).
		iProgressDialog->ProcessFinishedL();

		// Close the database.
		delete iDatabase;
		iDatabase = NULL;
		}
	}

void CNameSwapAO::DoCancel()
	{
	// Synchronously compress the database.
	iDatabase->CompactL();

	delete iDatabase;
	iDatabase = NULL;
	}

TInt CNameSwapAO::RunError(TInt /*aError*/)
	{
	// Synchronously compress the database.
	iDatabase->CompactL();

	delete iDatabase;
	iDatabase = NULL;

	// Just return KErrNone to stop the active scheduler panicking.
	return KErrNone;
	}

void CNameSwapAO::DialogDismissedL(TInt /*aButtonId*/)
	{
	// Cancel anything that's still going on.
	Cancel();
	}

void CNameSwapAO::SwapContactL(TInt aIndex)
	{
	CContactItem* contact;
	HBufC* firstNameBuf;
	HBufC* lastNameBuf;

	// Open the contact, pushing it onto the cleanup stack.
	contact = iDatabase->OpenContactLX((*iContacts)[aIndex]);

	CContactItemFieldSet& fieldSet = contact->CardFields();

	// Get first name.

	TInt index = fieldSet.Find(KUidContactFieldGivenName);

	// Check that the first name field is actually there.
	if ((index < 0) || (index >= fieldSet.Count()))
		{
		CleanupStack::PopAndDestroy(); // contact
		return;
		}

	CContactItemField& firstNameField = fieldSet[index];
	CContactTextField* firstName = firstNameField.TextStorage();

	firstNameBuf = firstName->Text().AllocLC();

	// Get last name.

	index = fieldSet.Find(KUidContactFieldFamilyName);

	// Check that the last name field is actually there.
	if ((index < 0) || (index >= fieldSet.Count()))
		{
		CleanupStack::PopAndDestroy(2); // contact, firstNameBuf
		return;
		}

	CContactItemField& lastNameField = fieldSet[index];
	CContactTextField* lastName = lastNameField.TextStorage();

	lastNameBuf = lastName->Text().AllocLC();

	// If the contact has both first and last names defined, swap the names.
	if ((firstNameBuf->Length() > 0) && ((*firstNameBuf) != KSpace) &&
		(lastNameBuf->Length() > 0) && ((*lastNameBuf) != KSpace))
		{
		// Note that the contacts DB takes ownership of the HBufC's we pass in,
		// so we don't need to delete them.
		firstName->SetText(lastNameBuf);
		lastName->SetText(firstNameBuf);

		// Action! Note that this command closes the contact as well, so we don't
		// need to do so.
		iDatabase->CommitContactL(*contact);

		CleanupStack::Pop(3); // contact, firstNameBuf, lastNameBuf
		}
	else
		{
		CleanupStack::PopAndDestroy(3); // contact, firstNameBuf, lastNameBuf
		}
	}

// End of file

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人高清免费观看| 亚洲午夜激情av| 亚洲欧洲综合另类| 午夜成人免费视频| 久久福利资源站| av电影一区二区| 欧美日韩一区二区在线观看视频 | 亚洲老妇xxxxxx| 日本麻豆一区二区三区视频| 国产老肥熟一区二区三区| 色天使色偷偷av一区二区| 欧美一卡在线观看| 国产精品久久精品日日| 亚洲影院久久精品| 国产毛片精品视频| 欧美在线视频全部完| 欧美哺乳videos| 亚洲男人的天堂网| 精品在线视频一区| 色综合久久久久久久久久久| 精品国产亚洲在线| 亚洲国产精品一区二区www在线| 老司机一区二区| 色吧成人激情小说| 久久久亚洲午夜电影| 亚洲在线一区二区三区| 国产精品77777| 日韩一区二区电影| 一区二区三区精品久久久| 国产麻豆成人传媒免费观看| 在线亚洲+欧美+日本专区| 国产性色一区二区| 日韩国产欧美视频| 在线看不卡av| 亚洲午夜av在线| 国产成人在线色| 日韩一区二区在线观看| 亚洲欧美色图小说| 成人午夜大片免费观看| 欧美大片顶级少妇| 视频一区在线播放| 在线亚洲人成电影网站色www| 国产欧美一区二区精品秋霞影院| 日本三级韩国三级欧美三级| 91麻豆文化传媒在线观看| 久久精品男人天堂av| 麻豆精品在线播放| 欧美日韩免费不卡视频一区二区三区 | 一区二区三区在线观看欧美| 国产成人综合在线观看| 欧美mv和日韩mv的网站| 亚洲成人福利片| 欧美性猛交一区二区三区精品| 亚洲欧洲日产国码二区| 国产宾馆实践打屁股91| 久久精品欧美日韩| 国产一区二区三区视频在线播放| 欧美一二三区在线观看| 日本在线播放一区二区三区| 欧美性欧美巨大黑白大战| 一区二区三区日韩欧美| 色综合久久88色综合天天| 亚洲少妇最新在线视频| 99精品欧美一区二区三区小说 | 国产精品一卡二卡在线观看| 欧美成人aa大片| 美腿丝袜亚洲综合| 日韩女优视频免费观看| 精品一区二区三区免费毛片爱| 欧美嫩在线观看| 视频一区国产视频| 欧美一区二区三区在线视频| 日本成人在线一区| 欧美成人vr18sexvr| 美女一区二区视频| 欧美哺乳videos| 国产曰批免费观看久久久| 精品成人一区二区三区四区| 国产曰批免费观看久久久| 久久精品一区二区三区不卡牛牛| 国产精品一区免费在线观看| 国产亚洲欧美一区在线观看| 高清国产一区二区三区| 国产精品国模大尺度视频| 99精品桃花视频在线观看| 亚洲日本丝袜连裤袜办公室| 91网站在线播放| 亚洲风情在线资源站| 中文字幕一区二区三区精华液| 成人黄色国产精品网站大全在线免费观看| 中文乱码免费一区二区| 色爱区综合激月婷婷| 石原莉奈一区二区三区在线观看 | 精品一区二区三区香蕉蜜桃| 久久午夜羞羞影院免费观看| 成人黄色免费短视频| 亚洲精品视频在线观看免费| 欧美性淫爽ww久久久久无| 日韩电影在线一区| 久久久久久久久久久电影| 菠萝蜜视频在线观看一区| 一区二区三区日韩在线观看| 欧美蜜桃一区二区三区| 国产一区亚洲一区| 亚洲乱码日产精品bd| 欧美系列在线观看| 久久99久久99小草精品免视看| 国产视频一区在线观看 | 亚洲精品国产a| 91精品一区二区三区在线观看| 国产乱码一区二区三区| 亚洲黄色免费网站| 欧美成人激情免费网| 99riav久久精品riav| 天堂一区二区在线| 国产三级精品视频| 欧美色图一区二区三区| 韩日精品视频一区| 一区二区三区小说| www精品美女久久久tv| 色av综合在线| 国产精品一二三区在线| 一区二区三区中文字幕在线观看| 日韩一级二级三级| 色婷婷综合在线| 国产一区二区女| 香蕉加勒比综合久久| 欧美韩国一区二区| 91麻豆精品国产91久久久 | 一区二区三区在线高清| 精品成a人在线观看| 色综合久久中文综合久久97| 激情久久久久久久久久久久久久久久| 亚洲视频综合在线| xfplay精品久久| 欧美日韩国产精选| 97久久人人超碰| 国产精品一二三| 日本欧美加勒比视频| 亚洲摸摸操操av| 久久久国产午夜精品| 欧美性色黄大片手机版| 国产精品一区2区| 青青草一区二区三区| 亚洲欧美偷拍卡通变态| 欧美韩日一区二区三区| 精品日韩欧美一区二区| 欧美日韩国产综合一区二区三区| 不卡在线视频中文字幕| 国产真实乱对白精彩久久| 日韩vs国产vs欧美| 亚洲国产精品人人做人人爽| 国产精品久久久久久久久快鸭| xfplay精品久久| 欧美一区国产二区| 欧美日韩国产片| 欧美性感一区二区三区| 91免费小视频| youjizz久久| 成人免费av资源| 欧美日韩国产综合一区二区三区| 91网站在线观看视频| www.爱久久.com| 成人高清视频免费观看| 国产成人综合视频| 国产美女娇喘av呻吟久久| 极品少妇一区二区三区精品视频| 污片在线观看一区二区| 亚洲综合av网| 亚洲国产视频在线| 亚洲综合视频在线| 日韩一区在线看| 专区另类欧美日韩| 亚洲丝袜美腿综合| 亚洲精品日韩一| 一区二区视频在线看| 中文字幕欧美一| 亚洲精品久久久久久国产精华液| 亚洲男人的天堂网| 亚洲综合一区二区| 亚洲风情在线资源站| 天天操天天综合网| 天天影视色香欲综合网老头| 天天综合网 天天综合色| 亚洲一区二区三区在线| 午夜成人在线视频| 蜜桃精品在线观看| 精品一区二区三区在线观看国产 | 久久久亚洲精品一区二区三区| 欧美一级久久久| 日韩精品中午字幕| 久久这里只有精品首页| 国产午夜精品福利| 中文字幕欧美日韩一区| 亚洲国产高清aⅴ视频| 亚洲同性gay激情无套| 亚洲国产综合人成综合网站| 午夜精品影院在线观看| 男人的j进女人的j一区| 国产一区二区三区蝌蚪|