当前位置: 首页>>代码示例>>C++>>正文


C++ TVersion函数代码示例

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


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

示例1: TAgnVersion

void CalFileVersionUtils::FileVersionSupportedL(const TAgnVersion& aFileVersion, CalCommon::TCalFileVersionSupport& aStatus)
	{
	if ( aFileVersion == CurrentFileVersion() ||
			aFileVersion == TAgnVersion(TVersion(KMajorVersionNumber, KMinorVersionNumber, KBuildCompatibleVersion)))
		{
		// The the file was created by an agenda model
		// of the current version
		//
		aStatus = CalCommon::EFileIsCurrentVersion;
		}
	else
		{
		RArray<TAgnVersion> supportedFileVersions;
		CleanupClosePushL(supportedFileVersions);
		supportedFileVersions.AppendL(TAgnVersion(TVersion(KMajorVersionNumber, KOldMinorVersionNumber, KOldBuildV94)));
		supportedFileVersions.AppendL(TAgnVersion(TVersion(KMajorVersionNumber, KOldMinorVersionNumber, KOldBuildV92)));
		supportedFileVersions.AppendL(TAgnVersion(TVersion(KMajorVersionNumber, KOldMinorVersionNumber, KOldBuildV91)));
		
		// The file version is not current but if it is in the 
		// list of versions supported by this agenda model it can
		// be converted to current version.
		//
		aStatus = CalCommon::EUnsupportedFileVersion;
		for ( TInt i = 0; i < supportedFileVersions.Count(); ++i )
			{
			if ( supportedFileVersions[i] == aFileVersion )
				{
				aStatus = CalCommon::EFileNeedsConverting;
				break;
				}
			}
		CleanupStack::PopAndDestroy(&supportedFileVersions);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:34,代码来源:agsfileconverter.cpp

示例2: if

CAgnCalendarConverter* CalFileVersionUtils::CreateConverterL(const TAgnVersion& aFileVersion, CAgnServFile& aAgnServerFile)
/** @internalComponent */
	{
	CAgnCalendarConverter* converter = NULL;
	
	if (aFileVersion == TAgnVersion(TVersion(KMajorVersionNumber, KOldMinorVersionNumber, KOldBuildV91))) 
		{
		// file format 1.1.209 used in 9.1
		converter = CAgnCalendarConverter209::NewL(aAgnServerFile);
		}
	else if (aFileVersion == TAgnVersion(TVersion(KMajorVersionNumber, KOldMinorVersionNumber, KOldBuildV92))) 
		{
		// file format 1.1.210 used in 9.2
		converter = CAgnCalendarConverter210::NewL(aAgnServerFile);
		}
	else if (aFileVersion == TAgnVersion(TVersion(KMajorVersionNumber, KOldMinorVersionNumber, KOldBuildV94)))
		{
		// file format 1.1.211 used in 9.4 compacted file version
		converter = CAgnCalendarConverter211::NewL(aAgnServerFile);
		}
	else if (aFileVersion == CurrentFileVersion() )
		{
		converter = NULL;
		}
	else
		{
		User::Leave(KErrNotSupported);
		}
	
	return converter;
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:31,代码来源:agsfileconverter.cpp

示例3: CreateSession

EXPORT_C void RPackagerTestClient::ConnectL()
/** Check and create server process if it is not already running,
then create a server session. Also constructs packager member. */
	{
	// Assume the server is already running and attempt to create a session
	// 4 message slots
	TInt err = CreateSession(KPackagerServerTestName,TVersion(1,1,1),4);
	if(err == KErrNotFound)
		{
		// Server not running
		// Use the RProcess API to start it.
		RProcess server;
		User::LeaveIfError(server.Create(KPackagerServerTestExe,KNullDesC));

		// Synchronise with the server
		TRequestStatus reqStatus;
		server.Rendezvous(reqStatus);
		// Start the test harness
		server.Resume();
		// Server will call the reciprocal static synchronise cal User::WaitForRequest(reqStatus);
		User::WaitForRequest(reqStatus);
		server.Close();
		User::LeaveIfError(reqStatus.Int() != KErrNone);
		// Create the root server session
		User::LeaveIfError(CreateSession(KPackagerServerTestName,TVersion(0,0,0),4));
		}		
		
	iPackager = CCntPackager::NewL();
	}
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:29,代码来源:t_packagertestclient.cpp

示例4: EGraphError

//---------------------------------------------------------------------------
void TData::Import(const std::wstring &FileName)
{
  if(std::_waccess(FileName.c_str(), 0))
    throw EGraphError(LoadRes(RES_FILE_NOT_FOUND, FileName));
  TConfigFile ConfigFile;
  ConfigFile.LoadFromUtf8File(FileName);
  std::wstring SavedByVersion = ConfigFile.Section(L"Graph").Read(L"Version", L"NA");
  if(SavedByVersion == L"NA")
    throw EGraphError(LoadRes(RES_NOT_GRAPH_FILE, FileName));
  if(TVersion(SavedByVersion) <= L"2.4")
    throw EGraphError(LoadRes(RES_INVALID_VERSION, SavedByVersion, L"2.5"));

  try
  {
    if(SavedByVersion < TVersion(L"4.4.0.414"))
      ConfigFile.LoadFromAnsiFile(FileName);
    Import(ConfigFile);
  }
  catch(Func32::EFuncError &Error)
  {
    throw;
  }
  catch(...)
  {
    throw EGraphError(LoadRes(RES_ERROR_READING_FILE, FileName));
  }
}
开发者ID:q2apro,项目名称:graph-padowan,代码行数:28,代码来源:Files.cpp

示例5: switch

// -----------------------------------------------------------------------------
// CPhoneMediatorSender::SendEvent
// -----------------------------------------------------------------------------
//
EXPORT_C void CPhoneMediatorSender::SendEvent( const TPhoneViewCommandId aCommandId, 
    TPhoneCommandParam& aCommandParam )
    {
    switch( aCommandId )
        {
        case EPhoneViewActivateMuteUIChanges:
            {
            TPhoneCmdParamBoolean& booleanParam = static_cast<TPhoneCmdParamBoolean&>( aCommandParam );
            const TBool audioMute( booleanParam.Boolean() );
            TInt response = KErrNone;

            TInt command = -1; 
            if( audioMute )
                {
                __PHONELOG( EBasic, EPhoneMediatorCenter, 
                    "CPhoneMediatorSender::SendEvent - transformed to Mediator Command EVtCmdMute" );
                command = EVtCmdMute;
                response = IssueCommand( KMediatorVideoTelephonyDomain,
                                         KCatPhoneToVideotelCommands, 
                                         command,
                                         TVersion( KPhoneToVideotelCmdVersionMajor,
                                                   KPhoneToVideotelCmdVersionMinor, 
                                                   KPhoneToVideotelCmdVersionBuild ),
                                         KNullDesC8 );
                }
            else
                {
                __PHONELOG( EBasic, EPhoneMediatorCenter, 
                    "CPhoneMediatorSender::SendEvent - transformed to Mediator Command EVtCmdUnmute" );
                command = EVtCmdUnmute;
                response = IssueCommand( KMediatorVideoTelephonyDomain,
                                         KCatPhoneToVideotelCommands, 
                                         command,
                                         TVersion( KPhoneToVideotelCmdVersionMajor,
                                                   KPhoneToVideotelCmdVersionMinor, 
                                                   KPhoneToVideotelCmdVersionBuild ),
                                         KNullDesC8 );
                }
                
            if( ( response == KErrInUse ) && ( iCommandBuffer.iCommandId == KErrNotFound ) )
                {
                // Previous command wasn't handled yet so buffer the last unhandled command.
                // This command will be sent after we get response to the previous command
                iCommandBuffer.iCommandId = command;
                iCommandBuffer.iDomainUid = KMediatorVideoTelephonyDomain;
                iCommandBuffer.iCategoryUid = KCatPhoneToVideotelCommands;
                iCommandBuffer.iVersion = TVersion( KPhoneToVideotelCmdVersionMajor,
                                                    KPhoneToVideotelCmdVersionMinor, 
                                                    KPhoneToVideotelCmdVersionBuild );
                }
            }
            break;
            
        default:
            break;    
        }   
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:61,代码来源:cphonemediatorsender.cpp

示例6: start

EXPORT_C TInt RMMFAudioPolicyProxy::Open(RServer2& aPolicyServerHandle)
	{
	TServerStart start(aPolicyServerHandle);
	TInt err = KErrNone;
	if(aPolicyServerHandle.Handle())
		{
		// Server is already running and attempt to create a session
		// 4 message slots
		err = CreateSession(aPolicyServerHandle, TVersion(KMMFAudioPolicyVersion,
														KMMFAudioPolicyMinorVersionNumber,
														KMMFAudioPolicyBuildVersionNumber));
		if(err != KErrNone)
			{
			return err;	
			}
		}
	else
		{
		TThreadFunction serverFunc = CMMFAudioPolicyServer::StartThread;
		RThread server;
		err = server.Create(_L(""),serverFunc, KAudioPolicyServerStackSize,
						KAudioPolicyServerInitHeapSize, KAudioPolicyServerMaxHeapSize,
						&start, EOwnerProcess);
		if(err != KErrNone)
			return err;
			// Synchronise with the server
		TRequestStatus reqStatus;
		server.Rendezvous(reqStatus);
		if (reqStatus!=KRequestPending)
			{
			server.Kill(0);
			}
		else 
			{
			// Start the test harness
			server.Resume();
			// Server will call the reciprocal static synchronise call
			}
		User::WaitForRequest(reqStatus); // wait for start or death
		server.Close();
		if(reqStatus.Int() != KErrNone)
			{
			return reqStatus.Int();
			}
		err = CreateSession(aPolicyServerHandle, TVersion(KMMFAudioPolicyVersion,
								 KMMFAudioPolicyMinorVersionNumber,
								 KMMFAudioPolicyBuildVersionNumber));
		}
	return err;		
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:50,代码来源:MmfBtAudioPolicyProxy.cpp

示例7: CreateSession

TInt RSignalSession::Connect()
	{
	TInt retry = 2; // A maximum of two iterations of the loop required
	for(;;)
		{
			TInt r = CreateSession(KServerName,TVersion(KIpcServerMajorVersionNumber,
										KIpcServerMinorVersionNumber,
										KIpcServerBuildVersionNumber), -1,
										EIpcSession_Sharable);

			if ( (KErrNotFound != r) && (KErrServerTerminated != r) )
				{
				return r;
				}
			if ( --retry == 0 )
				{
				return r;
				}
			r = StartServer();
			if ( (KErrNone != r) && (KErrAlreadyExists != r) )
				{
				return r;
				}
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:25,代码来源:signalclient.cpp

示例8: baseRomImage

LOCAL_C void baseRomImage()
//
// Set base addresses for the ROM image.
//
	{

	test.Start(_L("Setting up the header"));
	Mem::FillZ(&TheRomHeader,sizeof(TRomHeader));
	test.Printf(_L("1"));
	TheRomHeader.iVersion=TVersion(1,0,1);
	test.Printf(_L("2"));
	TTime t;
	t.HomeTime();
	test.Printf(_L("3"));
	TheRomHeader.iTime=t.Int64();
	test.Printf(_L("4"));
	TheRomHeader.iRomBase=UserSvr::RomHeaderAddress();
	test.Printf(_L("5"));
	TheRomHeader.iRomRootDirectoryList=TheCurrentBase=UserSvr::RomHeaderAddress()+sizeof(TRomHeader);
	test.Printf(_L("6"));
//
	test.Next(_L("Set dirs base"));
	TheRootDir->SetBaseDirs();
//
	test.Next(_L("Set files base"));
	TheRootDir->SetBaseFiles();
	TheRomHeader.iRomSize=TheCurrentBase-UserSvr::RomHeaderAddress();
//
	test.End();
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:30,代码来源:t_romg.cpp

示例9: TRAP

/**---------------------------------------------------------
 *
 * Connect()
 *
 * Opens a session to EventMediator server and starts the server if it
 * not yet started
 * 
 * Returns: KErrNone: OK
 *          value: error
 *
 *----------------------------------------------------------*/
EXPORT_C TInt REventMediator::Connect(void)
    {
    TInt ret = KErrNone;
    TRAP(ret, CreateListenedEventsListL());
    if (ret != KErrNone)
        {
        return ret;
        }
    
    TInt retry=2;
    for (;;)
        {
        TInt r=CreateSession(KEventMediatorServer,
                             TVersion(KEventMediatorMajorVersionNumber,
                                      KEventMediatorMinorVersionNumber,
                                      KEventMediatorBuildVersionNumber),
                             2 * KDefaultMessageSlots);
        
        if (r!=KErrNotFound && r!=KErrServerTerminated)
            return r;
        if (--retry==0)
            return r;
        r = Launcher::LaunchServer(KEventMediatorServer, KEventMediatorFile,
                                   KEventMediatorUid3);

        if (r!=KErrNone && r!=KErrAlreadyExists)
            return r;
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:40,代码来源:EventMediatorAPI.cpp

示例10: FTRACE

// ---------------------------------------------------------------------------
// This function connects to DUN server and creates a new session.
// ---------------------------------------------------------------------------
//
TInt RDun::Connect()
    {
    FTRACE(FPrint( _L("RDun::Connect()") ));
    TInt retry;
    TInt retVal = KErrNone;
    for ( retry=KDunRetryCount; retry>=0; retry-- )
        {
        retVal=CreateSession( KDialupServerName,
                              TVersion(KDunServerMajorVersionNumber,
                                       KDunServerMinorVersionNumber,
                                       KDunServerBuildVersionNumber),
                              KDunNumOfMessageSlots );
        if ( retVal == KErrNotFound || retVal == KErrServerTerminated )
            {
            retVal = StartServer();
            if ( retVal!=KErrNone && retVal!=KErrAlreadyExists )
                {
                FTRACE(FPrint( _L("RDun::Connect() complete (%d)"), retVal ));
                return retVal;
                }
            }
        else // KErrNone, or other error code.
            {
            FTRACE(FPrint( _L("RDun::Connect() complete (%d)"), retVal ));
            return retVal;
            }
        }
    FTRACE(FPrint( _L("RDun::Connect() complete (%d)"), retVal ));
    return retVal;
    }
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:34,代码来源:dunclient.cpp

示例11: return

// -----------------------------------------------------------------------------
// RHssInterface::Version
// Needed only when activating the server.
// -----------------------------------------------------------------------------
//
TVersion RHssInterface::Version() const
    {
    return( TVersion(
            KHotSpotMajorVersionNumber,
            KHotSpotMinorVersionNumber,
            KHotSpotBuildVersionNumber ) );
    }
开发者ID:gvsurenderreddy,项目名称:symbiandump-mw4,代码行数:12,代码来源:hssinterface.cpp

示例12: TVersion

//
// DTrkXtiDriverFactory::Install
//
void DTrkXtiDriverFactory::GetCaps(TDes8& aDes) const
{
    TCapsTrkXtiDriver b;
    b.iVersion = TVersion(KMajorXtiVersionNumber, KMinorXtiVersionNumber, KBuildXtiVersionNumber);
    
    Kern::InfoCopy(aDes,(TUint8*)&b, sizeof(b));
}
开发者ID:fedor4ever,项目名称:devicedbgsrvs,代码行数:10,代码来源:TrkXtiDriver.cpp

示例13: driver

/**
 Logical device constructor. This is called while creating the LDD factory
 object as a part of the driver (LDD) loading.
 */
DExDriverLogicalDevice::DExDriverLogicalDevice()
	{
	// Set iParseMask to KDeviceAllowPhysicalDevice to tell the kernel
	// that this driver supports a PDD. Based on this flag value, kernel
	// will search for a matching PDD to load. KDeviceAllowUnit can be set
	// to make driver support multiple units. KDeviceAllowInfo can also be
	// set if driver wants to use device info.
	//
	iParseMask = KDeviceAllowPhysicalDevice | KDeviceAllowUnit;

	// LDD is not deciding which units have to be supported. PDD defines
	// which units are supported by setting iUnitsMask in physical device.
	// Hence, mask is set to 0xffffffff here.
	//
	iUnitsMask=KUartUnitMaskLdd;

	// Set the version of the interface supported by this LDD, that consists
	// of driver major number, device minor number and build version number.
	// It will normally be incremented if the interface changes.Validating
	// code assumes that clients requesting older versions will be OK with
	// a newer version, but clients requesting newer versions will not want
	// an old version.
	//
	iVersion = TVersion(KExLddMajorVerNum,KExLddMinorVerNum,KExLddBuildVerNum);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:29,代码来源:d_exsync_ldd.cpp

示例14: Describe

void CProtocolExaout::Describe(TServerProtocolDesc& anEntry)
	/**
	* Return the description of the protocol.
	*
	* Becauses this example does not provide the socket service (SAP),
	* most of the fields in the description can be set to zero. Only
	* the following need to be initialized to something specific:
	*
	* - iName		The name of the protocol ("exain").
	* - iAddrFamily	The address family of the protocol (KAfExain).
	* - iProtocol	The protocol number (KProtocolExain).
	*/
	{
/** @code */
	anEntry.iName=_S("exaout");
	anEntry.iAddrFamily=KAfExaout;
	anEntry.iSockType=0;
	anEntry.iProtocol=KProtocolExaout;
	anEntry.iVersion=TVersion(1, 0, 0);
	anEntry.iByteOrder=EBigEndian;
	anEntry.iServiceInfo=0;
	anEntry.iNamingServices=0;
	anEntry.iSecurity=0;
	anEntry.iMessageSize=0;
	anEntry.iServiceTypeInfo=0;
	anEntry.iNumSockets=0;
/** @endcode */
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:28,代码来源:exaout_init.cpp

示例15: TVersion

/*
----------------------------------------------------------------------------------------
// This is the standard retry pattern for server connection
----------------------------------------------------------------------------------------
*/
TInt RExampleServerClient::Connect()
{
	TInt retry=2;
	for (;;)
	{
		TInt r=CreateSession(KCrashServerName,
		TVersion(SServMajorVersionNumber,
                 SServMinorVersionNumber,
                 SServBuildVersionNumber)
		,1);
		if (r!=KErrNotFound && r!=KErrServerTerminated)
		{
			return r;
		}
		if (--retry==0)
		{
			return r;
		}
		r=StartServer();
		
		if (r!=KErrNone && r!=KErrAlreadyExists)
		{
			return r;
		}
	}
}
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:31,代码来源:ExampleServerSession.cpp


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