• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ UserProfile类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中UserProfile的典型用法代码示例。如果您正苦于以下问题:C++ UserProfile类的具体用法?C++ UserProfile怎么用?C++ UserProfile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了UserProfile类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: itemActivatedComboBoxSlot

//VOXOX CHANGE by Rolando - 2009.05.21 -commented line, we are now using a logo
//VOXOX CHANGE by Rolando 04-06-09
//void QtAddVoxOxAccount::updateAvatarLabel(std::string profileName){	
//		
//	UserProfile * userProfile = new UserProfile();
//
//	//gets userprofile
//	_cUserProfileHandler.getUserProfileHandler().LoadUserProfileFromName(userProfile, profileName);
//	std::string backgroundPixmapFilename = ":/pics/avatar_background.png";
//
//	if(userProfile){		
//		std::string foregroundPixmapData = userProfile->getIcon().getData();
//		_ui->avatarLabel->setPixmap(PixmapMerging::merge(foregroundPixmapData, backgroundPixmapFilename));//merge two images
//	}
//	else{
//		QPixmap backgroundPixmap;
//		backgroundPixmap.loadFromData((uchar *) backgroundPixmapFilename.c_str(), backgroundPixmapFilename.size());
//		_ui->avatarLabel->setPixmap(backgroundPixmap);
//	}
//	
//	
//		
//}
//VOXOX CHANGE by Rolando 04-06-09
void QtAddVoxOxAccount::itemActivatedComboBoxSlot(int index) {

	QString profileName = _ui->usernameComboBox->itemText(index);
	
	UserProfile userProfile;
	if (_cUserProfileHandler.getUserProfileHandler().LoadUserProfileFromName(&userProfile, _profileMap[profileName.toStdString()])) {
		SipAccount * sipAccount = userProfile.getSipAccount();
		if (sipAccount) {
			if (sipAccount->isPasswordRemembered()) {
				setPassword(sipAccount->getUserPassword());
				
				_ui->rememberPasswordCheckBox->setCheckState(Qt::Checked);
			} else {
				setPassword("");				
				_ui->rememberPasswordCheckBox->setCheckState(Qt::Unchecked);
			}

			_ui->publicComputerCheckBox->setChecked(!sipAccount->isUsernameRemembered());					

			_ui->automaticallyLoginCheckBox->setChecked(sipAccount->isAutoLoginVoxOx());			
		}
	}
	//VOXOX CHANGE by Rolando - 2009.05.21 -commented line, we are now using a logo
	//updateAvatarLabel(profileName.toStdString());
}
开发者ID:,项目名称:,代码行数:49,代码来源:


示例2: userProfileStorage

void UserProfileHandler::saveUserProfile(UserProfile & userProfile) {
	if (_autoSave && &userProfile && !userProfile.isDestroying() )	//VOXOX - JRT - 2009.09.22 
	{
		UserProfileFileStorage userProfileStorage(userProfile);
		userProfileStorage.save(userProfile.getName());
	}
}
开发者ID:,项目名称:,代码行数:7,代码来源:


示例3: GetDemoCtr

pair<double,int> UserDemographicCache::GetUserAdGroupsCtr(const UserProfile & user_profile, Ice::Long zone_id,int pos_id, Ice::Long group_id, Ice::Long sponsor_id,string app_name) {
    //get stage gender
    //Ice::Long group_id = group_ptr->group_id();
    //Ice::Long sponsor_id = group_ptr->member_id();
    int gender = user_profile.gender();
    int stage = user_profile.stage();
    int uid = user_profile.id();

    stringstream zone_name;
    zone_name.str("");
    if (zone_id == 100000000001 && app_name.size() > 0) {
        zone_name << app_name;
    } else {
        zone_name << zone_id;
    }
    pair <double ,int> res = GetDemoCtr(zone_name.str(),sponsor_id, group_id , pos_id ,  gender, stage, uid);
    //当zone_id == 100000000001 且 res.second == 3 时表示没有此app数据,此时回退到01位置的人口学
    if (zone_id == 100000000001 && res.second == 3 && app_name.size() > 0) {
        zone_name.str("");
        zone_name << zone_id;
        res = GetDemoCtr(zone_name.str(),sponsor_id, group_id , pos_id ,  gender, stage, uid);
    } else if (zone_id == 100000000001 && res.second >= 0 && res.second != 3 && app_name.size() > 0) {
        res.second += 1000;
    }


    //pair <double ,int> res = GetDemoCtr(zone_id,sponsor_id, group_id , pos_id ,  gender, stage, uid);
    //group_ptr->SetDemoState(res.second);
    //MCE_DEBUG("3Us::GetUserAdGroupsCtr:zone_id:" << zone_id <<",pos_id:" << pos_id <<",state:" << group_ptr->GetDemoState()<< ",uid:" << user_profile.id() <<"groupid:" << group_id);
    return res;
}
开发者ID:goby,项目名称:oce,代码行数:31,代码来源:UserDemographicCache.cpp


示例4: wengoAccount

void QtAddVoxOxAccount::loginClicked() {
	
	std::string login = _ui->usernameComboBox->currentText().toStdString();
	std::string password = _ui->passwordLineEdit->text().toStdString();

	if (!login.empty() && !password.empty()) {
		WengoAccount wengoAccount(login, password, _ui->rememberPasswordCheckBox->isChecked());
		wengoAccount.setVisibleName(login);
		wengoAccount.setRememberPassword(_ui->rememberPasswordCheckBox->isChecked());//VOXOX CHANGE by Rolando 04-06-09
		wengoAccount.setRememberUsername(_ui->rememberPasswordCheckBox->isChecked());//VOXOX CHANGE by Rolando 04-06-09
		wengoAccount.setAutoLoginVoxOx(_ui->automaticallyLoginCheckBox->isChecked());//VOXOX CHANGE by Rolando 04-06-09
		//_currentUsername = login;

		// Looking for the selected profile
		if (!_cUserProfileHandler.userProfileExists(login)) {
			// The selected profile does not exist. Creating a new one.
			UserProfile userProfile;
			userProfile.setSipAccount(wengoAccount, false /* needInitialization */);
			UserProfileFileStorage userProfileStorage(userProfile);
			userProfileStorage.save(login);
			
		}			
		_cUserProfileHandler.setCurrentUserProfile(login, wengoAccount);	
				
		_loginDialog->accept();
		
	}

}
开发者ID:,项目名称:,代码行数:29,代码来源:


示例5: onEnter

void RegisterLayer::onEnter()
{
    TextInputDelegate::onEnter();
    
    UserProfile* user = UserProfile::sharedUserProfile();
    if(!user->email().empty())
        setTextFieldString(kTagEmail, user->email().c_str());

}
开发者ID:flywingsky,项目名称:drawstory_client,代码行数:9,代码来源:RegisterLayer.cpp


示例6:

CoIpManager * WengoPhone::getCoIpManager() const {
    CoIpManager *result = NULL;
    UserProfile *userProfile = _userProfileHandler->getCurrentUserProfile();

    if (userProfile) {
        result = &userProfile->getCoIpManager();
    }

    return result;
}
开发者ID:,项目名称:,代码行数:10,代码来源:


示例7: trigger

int TriggerInterface::trigger(const UserProfile &profile, std::vector<long> &zones, GroupDict& groups)
{
	TriggerInputInfo input;
	input.age = profile.age();
	input.gender = profile.gender();
	input.stage = profile.stage();
	input.grade = profile.grade();
	input.uid = profile.id();
	stringstream ss;
	ss << profile.school();
	input.school = ss.str();

	input.ipArea = profile.ip_area();
	input.currentArea = profile.current_area();
	input.company = profile.work_place();
	input.zones = zones;

  PingStat stat;
	try
	{
		int ret = IndexServiceReplicaAdapter::instance().trigger(input, groups);
		return ret;
	}
	catch (Ice::Exception& e) 
	{
		MCE_WARN("IndexServiceReplicaAdapter trigger caught ICEexception: " << e << " ,uid: " << input.uid);
		return -1;
	}
	catch (std::exception& e) 
	{
		MCE_WARN("IndexServiceReplicaAdapter trigger caught STDexception: " << e.what() << " ,uid: " << input.uid);
		return -1;
	}

}
开发者ID:gunner14,项目名称:old_rr_code,代码行数:35,代码来源:TriggerInterface.cpp


示例8: GetUserKey

bool UserProfileClient::Set(const UserProfile & o) {
  char key[32];
  GetUserKey(o.id(), key, 32);
   
  const UserProfile & profile = o;

  string value;
  o.SerializeToString(&value);

  return SetMemcached(key, value, 0);
}
开发者ID:bradenwu,项目名称:oce,代码行数:11,代码来源:user_profile_client.cpp


示例9: _userProfile

CUserProfile::CUserProfile(UserProfile & userProfile, CWengoPhone & cWengoPhone)
	: _userProfile(userProfile),
	_cWengoPhone(cWengoPhone),
	_cContactList(userProfile.getContactList(), cWengoPhone),
	_cWenboxPlugin(*userProfile.getWenboxPlugin(), cWengoPhone),
	_cChatHandler(userProfile.getChatHandler(), *this) 
{
	_cHistory			= NULL;
	_cPhoneLine			= NULL;
	_cSms				= NULL;
	_cSoftUpdate		= NULL;
	_cWsCallForward		= NULL;
	_cWsContactProfile	= NULL;	//VOXOX - JRT - 2009.08.03 


	_pUserProfile = PFactory::getFactory().createPresentationUserProfile(*this);

//JRT-XXX	_userProfile.userProfileInitializedEvent		+= boost::bind(&CUserProfile::userProfileInitializedEventHandler,		this, _1);
	_userProfile.phoneLineCreatedEvent				+= boost::bind(&CUserProfile::phoneLineCreatedEventHandler,				this, _1, _2);
	_userProfile.wsSmsCreatedEvent					+= boost::bind(&CUserProfile::wsSmsCreatedEventHandler,					this, _1, _2);
	_userProfile.wsSoftUpdateCreatedEvent			+= boost::bind(&CUserProfile::wsSoftUpdateCreatedEventHandler,			this, _1, _2, _3);	//VOXOX - JRT - 2009.10.27 
	_userProfile.wsCallForwardCreatedEvent			+= boost::bind(&CUserProfile::wsCallForwardCreatedEventHandler,			this, _1, _2);
	_userProfile.loginStateChangedEvent				+= boost::bind(&CUserProfile::loginStateChangedEventHandler,			this, _1, _2);
	_userProfile.networkDiscoveryStateChangedEvent	+= boost::bind(&CUserProfile::networkDiscoveryStateChangedEventHandler, this, _1, _2);

	_userProfile.getHistory().historyLoadedEvent	+= boost::bind(&CUserProfile::historyLoadedEventHandler,				this, _1);

	_userProfile.getPresenceHandler().authorizationRequestEvent += boost::bind(&CUserProfile::authorizationRequestEventHandler, this, _1, _2, _3);
	_userProfile.getPresenceHandler().incomingSubscribeEvent	+= boost::bind(&CUserProfile::incomingSubscribeEventHandler,	this, _1, _2, _3, _4, _5);

	//Check if a PhoneLine already exist
	if (_userProfile.getActivePhoneLine()) 
	{
		phoneLineCreatedEventHandler(_userProfile, *_userProfile.getActivePhoneLine());
	}

	historyLoadedEventHandler(_userProfile.getHistory());

	/*if (_userProfile.getWsSms()) 
	{
		wsSmsCreatedEventHandler(_userProfile, *_userProfile.getWsSms());
	}*/

	checkForSoftUpdate( false );	//Automatic - //VOXOX - JRT - 2009.10.27 

	createWsContactProfile();	//Call now in case event already fired.

	//VOXOXCHANGE CJC	//VOXOX - JRT - 2009.05.24 TODO: find supporting files and remove from project.
	//Don't need call transfer functionality
	/*if (_userProfile.getWsCallForward()) {
		wsCallForwardCreatedEventHandler(_userProfile, *_userProfile.getWsCallForward());
	}*/
}
开发者ID:,项目名称:,代码行数:53,代码来源:


示例10: GetAds

AdResultMap AdEngineBReplicaAdapter::GetAds(const string & user_profile, const string & referer, int rotate_index, bool hide) {
  Ice::Context ctx;
  if(hide) {
    ctx["hide"] = "true";
  } else {
    ctx["hide"] = "false";
  }
  UserProfile profile;
  UserProfileClient::instance().Deserialize(user_profile, &profile);
  return getManager(GetServerIndex(profile.id()))->GetAds(user_profile, referer, rotate_index, ctx);
  // return getManager(profile.id() / 10 % 10)->GetAds(user_profile, referer, rotate_index);
}
开发者ID:gunner14,项目名称:old_rr_code,代码行数:12,代码来源:AdEngineBReplicaAdapter.cpp


示例11: put

void UserDao::put(string email, Entity* e)
{

	UserProfile* user = dynamic_cast<UserProfile*>(e);
	if (user == 0)
	{
		throw InvalidEntityException();
	}
	std::string json = user->toJson();

	DbHelper::put(email, json, USER);

}
开发者ID:sivoridaniel,项目名称:serverapp,代码行数:13,代码来源:UserDao.cpp


示例12: mDir

bool ConfigImporter::importContactsFromV1toV3(const string & fromDir, UserProfile & userProfile) {
	File mDir(fromDir);
	StringList fileList = mDir.getFileList();
	ContactList & contactList = userProfile.getContactList();

	ContactGroup contactGroup( "Classic", EnumGroupType::GroupType_User);	//JRT-GRPS
	contactList.addContactGroup( contactGroup );	///VOXOX - JRT - 2009.05.07 - JRT-GRPS

	IMAccountList imAccountList =
		userProfile.getIMAccountManager().getIMAccountsOfProtocol(EnumIMProtocol::IMProtocolWengo);

	if (!imAccountList.size()) {
		return false;
	}

	for (unsigned i = 0; i < fileList.size(); i++) {
		File mFile(fromDir + fileList[i]);
		string Id = fileList[i].substr(0, fileList[i].find("_", 0));
		vcard_t mVcard;

		initVcard(&mVcard);
		if (!mFile.getExtension().compare("vcf")) {
			if (classicVcardParser(fromDir + fileList[i], &mVcard) == false) {
				continue;
			}

			int extPos = fileList[i].find_last_of('.');
			string fileWoExt = fileList[i].substr(0, extPos + 1);
			classicXMLParser(fromDir + fileWoExt + "xml", &mVcard);

//			IMContact imContact(*imAccountList.begin(), mVcard.id);	//VOXOX - JRT - 2009.04.09 
			IMContact imContact(imAccountList.begin()->second, mVcard.id);
			
			//VOXOX - JRT - 2009.04.26 
//			Contact & contact = contactList.createContact();
//			contact.setGroupId(contactList.getContactGroupIdFromName("Classic"));
//			addContactDetails(contact, &mVcard);
//			contact.addIMContact(imContact);

			Contact* contact = contactList.createContact();
//			contact->setGroupId(contactList.getContactGroupIdFromName("Classic"));
			contact->addToGroup(contactList.getContactGroupIdFromName("Classic"), EnumGroupType::GroupType_User);	//VOXOX - JRT - 2009.05.06 JRT-GRPS
			addContactDetails(*contact, &mVcard);
			contact->addIMContact(imContact);
			contactList.addContact( contact );	//ContactList will delete contact
			//End Voxox
		}
	}
	return true;
}
开发者ID:,项目名称:,代码行数:50,代码来源:


示例13: WengoWebService

WsAccount::WsAccount(UserProfile & userProfile )
	: WengoWebService(userProfile.getWengoAccount()),
	_userProfile(userProfile)
{
	Config & config = ConfigManager::getInstance().getCurrentConfig();

	//Setup the web service
//	setHostname(config.getWengoServerHostname());

#if 1
//	setHostname( "" );//VOXOX - CJC - 2009.07.05 Set server address
	setHostname( config.getApiHostname() );
	setServicePath( config.getVoxOxSyncWSPath() );
	setHttps(true);
	setPort(443);
#else
	setHostname( "" );
	setServicePath( "" );//VOXOX - CJC - 2009.07.05  Ser server address
	setHttps(false);
	setPort( 80 );
#endif

	setGet(true);	//true = POST in Curl lib.
	setWengoAuthentication(false);

	_userNetworkId = 0;
	_bDeleted	   = false;
}
开发者ID:,项目名称:,代码行数:28,代码来源:


示例14: file

vector<UserProfile> UsersFile::getUserList()
{
	std::string line;
	std::ifstream file("UserProfileDb");
	int val;
	bool boolval;

	if (file.is_open())
	{
		users.clear();
		UserProfile *p;

		while (file >> line)
		{

			p = new UserProfile();
			p->setUserName(line);
			file >> val;
			p->setAge(val);
			file >> boolval;
			p->setGender(boolval);
			file >> val;
			p->setHeight(val);
			file >> val;
			p->setWeight(val);
			file >> val;
			p->setActivityLevel(val);

			users.insert(users.begin(),*p);

		}

		file.close();
	
	}
开发者ID:ranjithrajvasam,项目名称:IIIT-Course-Works,代码行数:35,代码来源:UsersFile.cpp


示例15: MCE_INFO

AdResultMap AdMatchManagerI::GetAdsTest(::Ice::Int uid, ::Ice::Int stage,
    ::Ice::Int gender, ::Ice::Int age, const ::std::string& currentArea,
    const ::std::string& ipArea, ::Ice::Long school, ::Ice::Int grade,
    int count, const string & referer, int rotate_index, const Ice::Current& current) {
  AdInfoSeq out;
  
  string serialized;
  if (uid > 0) {
    bool b = UserProfileClient::instance().GetSerialized(uid, &serialized);

    if (!b) {
      MCE_INFO("profile not found in memcache. id=" << uid); 
      /*try {
        serialized = AdUserCacheLoaderAdapter::instance().GetById(uid);
      } catch(Ice::Exception& e) {
        MCE_WARN("AdUserCacheLoaderAdapter GetById error : " << e << " uid=" << _login_uid);
      } catch(std::exception& e) {
        MCE_WARN("AdUserCacheLoaderAdapter GetById error : " << e.what() << " uid=" << _login_uid);
      }*/
    }
  }

  UserProfile profile;
  profile.ParseFromString(serialized);


  /*UserProfile profile;
  profile.set_age(age);
  profile.set_id(uid);
  profile.set_gender(gender);
  profile.set_stage(stage);
  profile.set_current_area(currentArea);
  profile.set_ip_area(ipArea);
  profile.set_school(school);
  profile.set_grade(grade);*/

  profile.set_ip(1896477159);

  string tmp;
  UserProfileClient::instance().Serialize(profile, &tmp);

  string tmpref = referer;
  return AdMatchManagerI::GetAds(tmp, tmpref, rotate_index);

}
开发者ID:gunner14,项目名称:old_rr_code,代码行数:45,代码来源:AdMatchManagerI.cpp


示例16: QAbstractTableModel

QtHistory::QtHistory(CHistory & cHistory)
	: QAbstractTableModel(NULL),
	_cHistory(cHistory) {

	_chatLogViewer = NULL;
	_mutex = new QMutex(QMutex::Recursive);

	_stateFilter = HistoryMemento::Any;

	QtWengoPhone * qtWengoPhone = (QtWengoPhone *) _cHistory.getCWengoPhone().getPresentation();
	_historyWidget = new QtHistoryWidget(qtWengoPhone->getWidget(), this);
	SAFE_CONNECT(_historyWidget,
		SIGNAL(replayItemRequested(int)),
		SLOT(replayItem(int))
	);
	SAFE_CONNECT(_historyWidget,
		SIGNAL(showChatLogRequested(int)),
		SLOT(showChatLog(int))
	);
	SAFE_CONNECT(_historyWidget,
		SIGNAL(removeItemRequested(int)),
		SLOT(removeItem(int))
	);
	SAFE_CONNECT(_historyWidget,
		SIGNAL(missedCallsSeen()),
		SLOT(resetUnseenMissedCalls())
	);

	SAFE_CONNECT(_historyWidget,
		SIGNAL(showOnlyItemOfType(int)),
		SLOT(showOnlyItemOfTypeSlot(int))
	);
	qtWengoPhone->setQtHistoryWidget(_historyWidget);
	
	// define user use a Wengo or a SIP account
	UserProfile * userProfile = _cHistory.getCWengoPhone().getCUserProfileHandler().getUserProfileHandler().getCurrentUserProfile();
	if (userProfile) {
		_isWengoAccountConnected = userProfile->hasWengoAccount();
	} else {
		_isWengoAccountConnected = false;
	}
	////

	updatePresentation();
}
开发者ID:,项目名称:,代码行数:45,代码来源:


示例17: load

void QtAddVoxOxAccount::load(std::string sipAccountName) {
	//load userprofile
	UserProfile * userProfile = _cUserProfileHandler.getUserProfileHandler().getUserProfile(sipAccountName);
	if (userProfile) {
		SipAccount * sipAccount = userProfile->getSipAccount();
		//VOXOX CHANGE by Rolando 04-06-09
		if (sipAccount) {
			
			if (sipAccount->isPasswordRemembered()) {
				setPassword(sipAccount->getUserPassword());
				_ui->rememberPasswordCheckBox->setCheckState(Qt::Checked);
			} else {
				setPassword("");
				_ui->rememberPasswordCheckBox->setCheckState(Qt::Unchecked);
			}

			if (!sipAccount->isUsernameRemembered()) {		
				setAccountName("");
				setPassword("");
				_ui->rememberPasswordCheckBox->setCheckState(Qt::Unchecked);
				/*_ui->publicComputerCheckBox->setCheckState(Qt::Checked);*/
			} else {
				// Add and select the given SipAccount
				//SERGIO MARIN IF EXISTS ACCOUNT IN COMBO BOX
				if (_ui->usernameComboBox->findText(QString::fromStdString(sipAccountName))== -1){
					_ui->usernameComboBox->addItem(QString::fromStdString(sipAccountName));
				}

				setAccountName(QString::fromStdString(sipAccountName));

				_ui->publicComputerCheckBox->setCheckState(Qt::Unchecked);
				
			}

			_ui->automaticallyLoginCheckBox->setChecked(sipAccount->isAutoLoginVoxOx());

		}
	}
	else {
		//VOXOX CHANGE by Rolando - 2009.05.21 -commented line, we are now using a logo
		//updateAvatarLabel("");
	}
}
开发者ID:,项目名称:,代码行数:43,代码来源:


示例18: tr

void QtAddWengoAccount::loginClicked() {
	std::string login = _ui->email->text().toStdString();
	
	// check if login is an email address
	//VOXOX CHANGE
	//CJC
	//We dont need any @
	/*if (login.find("@", 0) == login.npos) {
	
		QMessageBox::warning(this, tr("@[email protected] - Connexion"),
			tr("Please enter an email address."),
			QMessageBox::Ok, QMessageBox::NoButton);
	
		return;
	}*/
	////
	
	std::string password = _ui->password->text().toStdString();
	if (!login.empty() && !password.empty()) {
		WengoAccount wengoAccount(login, password, true/*_ui->rememberPassword->isChecked()*/);
		wengoAccount.setVisibleName(login);

		// Looking for the selected profile
		if (!_cUserProfileHandler.userProfileExists(login)) {
			// The selected profile does not exist. Create it.
			UserProfile userProfile;

			//VOXOX CHANGE by Rolando 01-20-09 eliminated add test calls
			/*Config & config = ConfigManager::getInstance().getCurrentConfig();
			QtAddAccountUtils::addTestContacts(&userProfile,
				config.getWengoAudioTestCall(),
				config.getWengoVideoTestCall()
				);*/

			userProfile.setSipAccount(wengoAccount, false /* needInitialization */);
			UserProfileFileStorage userProfileStorage(userProfile);
			userProfileStorage.save(login);
		}
		_cUserProfileHandler.setCurrentUserProfile(login, wengoAccount);
		_loginDialog->accept();
	}
}
开发者ID:,项目名称:,代码行数:42,代码来源:


示例19: getTone

void DtmfTheme::playTone(const std::string & key) const {

	const Tone * tone = getTone(key);
	if (!tone) {
		LOG_WARN("Could not find a tone for key '" + key + "'");
		return;
	}

	Config & config = ConfigManager::getInstance().getCurrentConfig();
	std::string soundfile = _repertory + tone->getSoundFile();

	if (tone->getLocalAction() == Tone::Play) {
		Sound::play(File::convertPathSeparators(soundfile),
					config.getAudioRingerDeviceId()
		);
	}

	if (tone->getRemoteAction() == Tone::Play) {
		UserProfile * userprofile =
			_wengoPhone.getUserProfileHandler().getCurrentUserProfile();
		if (userprofile) {
			IPhoneLine * iphoneline = userprofile->getActivePhoneLine();
			if (iphoneline) {
				PhoneCall * phonecall = iphoneline->getActivePhoneCall();
				if (phonecall) {
					
					if (tone->getAudioFormat() == Tone::Dtmf) {
						iphoneline->playDtmf(
							phonecall->getCallId(),
							(char)tone->getKey()[0]
						);
					} else {
						iphoneline->playSoundFile(
							phonecall->getCallId(),
							File::convertPathSeparators(soundfile)
						);
					}
				}
			}
		}
	}
}
开发者ID:,项目名称:,代码行数:42,代码来源:


示例20: fromPersistent

void UserProfileMapper::fromPersistent(Object* object, const ResultRecord& record) {

    UserProfile * profile = (UserProfile*)object;
    UserProfileInfo p_info;

    p_info.profile_code = fromString<int>(record.getValue( PROFILE_ID ));
    p_info.profile_name = record.getValue(PROFILE_NAME);

    p_info.access_rigths[AR_REGISTRATION_BY_CODE] = record.getValue(PROFILE_R_CODEREG) == "t";
    p_info.access_rigths[AR_REGISTRATION_BY_BARCODE] = record.getValue(PROFILE_R_SCANERREG) == "t";
    p_info.access_rigths[AR_REGISTRATION_BY_MANUAL_INPUT_BARCODE] = record.getValue(PROFILE_R_BARCODEMANUALREG) == "t";
    p_info.access_rigths[AR_REGISTRATION_BY_VISUAL_SEARCH] = record.getValue(PROFILE_R_VSREG) == "t";
    p_info.access_rigths[AR_REGISTRATION_CANCEL] = record.getValue(PROFILE_R_CANCELREG) == "t";
    p_info.access_rigths[AR_QUANTITY_EDITION] = record.getValue(PROFILE_R_QUANTITYEDITION) == "t";
    p_info.access_rigths[AR_PRICE_EDITION] = record.getValue(PROFILE_R_PRICEEDITION) == "t";
    p_info.access_rigths[AR_REGISTRATION_REPEAT] = record.getValue(PROFILE_R_REGISTRATION_REPEAT) == "t";
    p_info.access_rigths[AR_CHECK_CANCEL] = record.getValue(PROFILE_R_CHECK_CANCEL) == "t";
    p_info.access_rigths[AR_MANUAL_DISCOUNT] = record.getValue(PROFILE_R_MANUAL_DISCOUNT) == "t";
    p_info.access_rigths[AR_FIXED_DISCOUNT] = record.getValue(PROFILE_R_FIXED_DISCOUNT) == "t";
    p_info.access_rigths[AR_DISCOUNT_CANCEL] = record.getValue(PROFILE_R_DISCOUNT_CANCEL) == "t";
    p_info.access_rigths[AR_RETURN_BY_NUMBER] = record.getValue(PROFILE_R_RETURN_BY_NUMBER) == "t";
    p_info.access_rigths[AR_RETURN_MANUAL] = record.getValue(PROFILE_R_RETURN_MANUAL) == "t";
    p_info.access_rigths[AR_CASH_PAYMENT] = record.getValue(PROFILE_R_CASH_PAYMENT) == "t";
    p_info.access_rigths[AR_CREDIT_PAYMENT] = record.getValue(PROFILE_R_CREDIT_PAYMENT) == "t";
    p_info.access_rigths[AR_CONT_PAYMENT] = record.getValue(PROFILE_R_CONT_PAYMENT) == "t";
    p_info.access_rigths[AR_Z_REPORT] = record.getValue(PROFILE_R_Z_REPORT) == "t";
    p_info.access_rigths[AR_OTHER_REPORT] = record.getValue(PROFILE_R_OTHER_REPORT) == "t";
    p_info.access_rigths[AR_KKM_SYNCHRONIZATION] = record.getValue(PROFILE_R_KKM_SYNCHRONIZATION) == "t";
    p_info.access_rigths[AR_ENTERING] = record.getValue(PROFILE_R_ENTERING) == "t";
    p_info.access_rigths[AR_GETTING] = record.getValue(PROFILE_R_GETTING) == "t";
    p_info.access_rigths[AR_CHECK_COPY] = record.getValue(PROFILE_R_CHECK_COPY) == "t";
    p_info.access_rigths[AR_OPEN_BOX] = record.getValue(PROFILE_R_OPEN_BOX) == "t";
    p_info.access_rigths[AR_PROGRAMM_SETUP] = record.getValue(PROFILE_R_PROGRAMM_SETUP) == "t";
    p_info.access_rigths[AR_HANDLE_UNLOAD] = record.getValue(PROFILE_R_HANDLE_UNLOAD) == "t";
    p_info.access_rigths[AR_HANDLE_UPLOAD] = record.getValue(PROFILE_R_HANDLE_UPLOAD) == "t";
    p_info.access_rigths[AR_PS_RECONSILIATION] = record.getValue(PROFILE_R_PS_RECONSILIATION) == "t";


    profile->replaceInfo(p_info);
}
开发者ID:oldbay,项目名称:dnc_kassa,代码行数:40,代码来源:UserProfileMapper.cpp



注:本文中的UserProfile类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ UserPtr类代码示例发布时间:2022-05-31
下一篇:
C++ UserName类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap