本文整理汇总了C++中PRINT1函数的典型用法代码示例。如果您正苦于以下问题:C++ PRINT1函数的具体用法?C++ PRINT1怎么用?C++ PRINT1使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PRINT1函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PRINT
// -----------------------------------------------------------------------------
// CGetPartialObject::VerifyParametersL
// Verify if the parameter of the request (i.e. offset) is good.
// -----------------------------------------------------------------------------
//
TBool CGetPartialObject::VerifyParametersL()
{
PRINT( _L( "MM MTP => CGetPartialObject::VerifyParametersL" ) );
__ASSERT_DEBUG( iRequestChecker, Panic( EMmMTPDpRequestCheckNull ) );
TBool result = EFalse;
iObjectHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
iOffset = Request().Uint32( TMTPTypeRequest::ERequestParameter2 );
iPartialDataLength = Request().Uint32( TMTPTypeRequest::ERequestParameter3 );
PRINT3( _L( "MM MTP <> CGetPartialObject::VerifyParametersL iObjectHandle = 0x%x, iOffset = 0x%x, iMaxLength = 0x%x " ),
iObjectHandle,
iOffset,
iPartialDataLength );
//get object info, but do not have the ownship of the object
CMTPObjectMetaData* objectInfo = iRequestChecker->GetObjectInfo( iObjectHandle );
__ASSERT_DEBUG( objectInfo, Panic( EMmMTPDpObjectNull ) );
const TDesC& suid( objectInfo->DesC( CMTPObjectMetaData::ESuid ) );
PRINT1( _L( "MM MTP <> CGetPartialObject::VerifyParametersL suid = %S" ), &suid );
TEntry fileEntry;
User::LeaveIfError( iFramework.Fs().Entry( suid, fileEntry ) );
if ( iOffset < fileEntry.FileSize() )
{
result = ETrue;
}
PRINT1( _L( "MM MTP <= CGetPartialObject::VerifyParametersL result = %d" ), result );
return result;
}
示例2: main
int main(int argc, const char * argv[])
{
int x, y=1, z;
if( y!=0) x=5;
PRINT1(d,x); //(3.1)
if(y==0) x=3;
else x=5;
PRINT1(d,x); //(3.2)
x=1;
if(y<0) if (y>0) x=3;
else x=5;
PRINT1(d,x); //(3.3)
if (z=y<0) x=3;
else if (y==0) x=5;
else x=7;
PRINT2(d,x,z); //(3.4)
if(z =(y==0))x=5;
x=3;
PRINT2(d,x,z); //(3.5)
if(x=z=y);
x=3;
PRINT2(d,x,z); //(3.6)
return 0;
}
示例3: defined
// ----------------------------------------------------------------------------
// CPcsKeyMap::GetMappedString
// ----------------------------------------------------------------------------
QString CPcsKeyMap::GetMappedString(QString aSource) const
{
#if defined(WRITE_PRED_SEARCH_LOGS)
const int KLogLength = 30;
TBuf<KLogLength> log(aSource.left(KLogLength).utf16());
PRINT1(_L("Enter CPcsKeyMap::GetMappedString input '%S'"), &log);
#endif
QString destination;
TBool skipHashStar = DetermineSpecialCharBehaviour(aSource);
TInt length = aSource.length();
for (int i = 0; i < length; ++i)
{
if (aSource[i] == KSpaceChar)
{
destination.append(KSeparatorChar);
}
else
{
QChar ch(0);
ch = MappedKeyForChar(aSource[i]);
if (!ShouldSkipChar(ch, skipHashStar))
{
destination.append(ch);
}
}
}
#if defined(WRITE_PRED_SEARCH_LOGS)
log = destination.left(KLogLength).utf16();
PRINT1(_L("End CPcsKeyMap::GetMappedString result '%S'"), &log);
#endif
return destination;
}
示例4: PRINT1
TBool CPredictiveSearchSynchronizer::CheckIfPredSearchTableExistsL(
const TDesC& aTableName) const
{
PRINT1(_L("CPredictiveSearchSynchronizer::CheckIfPredSearchTableExistsL table='%S'"),
&aTableName);
_LIT(KSelectFirstTableFormat,
"SELECT name FROM sqlite_master WHERE type='table' AND name='%S';");
TInt bufSize = KSelectFirstTableFormat().Length() +
aTableName.Length();
HBufC* select = HBufC::NewLC(bufSize);
select->Des().AppendFormat(KSelectFirstTableFormat, &aTableName);
RSqlStatement stmnt;
CleanupClosePushL(stmnt);
stmnt.PrepareL(iDatabase, *select);
TBool tableExists = (stmnt.Next() == KSqlAtRow);
CleanupStack::PopAndDestroy(&stmnt);
CleanupStack::PopAndDestroy(select);
PRINT1(_L("CPredictiveSearchSynchronizer::CheckIfPredSearchTablesExistL return %d"),
tableExists);
return tableExists;
}
示例5: PRINT1
// -----------------------------------------------------------------------------
// CMediaMtpDataProviderEnumerator::RunL
// Update the mpx db flag for round trip
// -----------------------------------------------------------------------------
//
void CMediaMtpDataProviderEnumerator::RunL()
{
PRINT1( _L( "MM MTP => CMediaMtpDataProviderEnumerator::RunL iStorages.Count() = %d" ), iStorages.Count() );
if ( iStorages.Count() > 0 )
{
const CMTPStorageMetaData& storage( iFramework.StorageMgr().StorageL( iStorages[0] ) );
TPtrC root( storage.DesC( CMTPStorageMetaData::EStorageSuid ) );
GetModifiedContentL( root );
TRAPD( err, iDataProvider.GetWrapperL().UpdateMusicCollectionL( root ) );
if ( err != KErrNone )
{
PRINT1( _L("MM MTP <> CMediaMtpDataProviderEnumerator::RunL, UpdateMusicCollectionL err =%d "), err );
}
iStorages.Remove( 0 );
TRequestStatus* status = &iStatus;
User::RequestComplete( status, iStatus.Int() );
SetActive();
}
else
{
iStorages.Reset();
SignalCompleteL( iDataProvider );
}
PRINT( _L( "MM MTP <= CMediaMtpDataProviderEnumerator::RunL" ) );
}
示例6: PRINT
// -----------------------------------------------------------------------------
// CSendObject::SaveEmptyFileL
// -----------------------------------------------------------------------------
//
void CSendObject::SaveEmptyFileL()
{
PRINT( _L( "MM MTP => CSendObject::SaveEmptyFileL" ) );
if ( EMTPFormatCodeAbstractAudioVideoPlaylist == iObjectFormat )
{
TInt err = iFileReceived->File().SetAtt( KEntryAttSystem | KEntryAttHidden,
KEntryAttReadOnly | KEntryAttNormal );
if ( err != KErrNone )
PRINT1( _L( "MM MTP <> CSendObject::SaveEmptyFileL err = %d" ), err );
iDpConfig.GetWrapperL().AddDummyFileL( iFullPath );
}
// Set subformat code to avoid MPX query for the first time to GetObjectReference,
// in which case references has been kept in fw.
if ( MmMtpDpUtility::HasReference( iObjectFormat ) )
iReceivedObjectInfo->SetUint( CMTPObjectMetaData::EFormatSubCode, EMTPSubFormatCodeUndefined );
// add playlist to MPX DB
TRAPD( err, AddMediaToStoreL() );
if ( err != KErrNone )
iRollbackList.Append( &CSendObject::RemoveObjectFromDbL );
else
iRollbackList.Reset();
PRINT1( _L( "MM MTP <= CSendObject::SaveEmptyFileL err = %d" ), err );
}
示例7: PRINT1
// -----------------------------------------------------------------------------
// CSendObject::ExistsL
// Check if the file already exists on the storage.
// -----------------------------------------------------------------------------
//
TBool CSendObject::ExistsL( const TDesC& aName ) const
{
PRINT1( _L( "MM MTP => CSendObject::Exists aName = %S" ), &aName );
// This detects both files and folders
TBool ret( EFalse );
ret = BaflUtils::FileExists( iFramework.Fs(), aName );
#ifdef MMMTPDP_REPLACE_EXIST_FILE
if( ret )
{
// delete the old one and replace
TInt delErr = iFramework.Fs().Delete( aName );
PRINT1( _L( "MM MTP <> CSendObject::Exists delErr = %d" ), delErr );
// delete from the metadata DB
TRAPD( err, iFramework.ObjectMgr().RemoveObjectL( aName ) );
PRINT1( _L( "MM MTP <> CSendObject::Exists err = %d" ), err );
if( err == KErrNone )
{
// do nothing, ignore warning
}
// delete from video/mpx DB
CMTPObjectMetaData* objectInfo = CMTPObjectMetaData::NewLC(); // + objectInfo
if ( iFramework.ObjectMgr().ObjectL( aName, *objectInfo ) )
{
TRAP_IGNORE( iWrapper.DeleteObjectL( aName,
objectInfo->Uint( CMTPObjectMetaData::EFormatCode ) ) );
}
CleanupStack::PopAndDestroy( objectInfo ); // - objectInfo
ret = EFalse;
}
#endif
PRINT1( _L( "MM MTP <= CSendObject::Exists ret = %d" ), ret );
return ret;
}
示例8: PRINT
// -----------------------------------------------------------------------------
// CGetObject::ServiceL
// GetObject request handler
// -----------------------------------------------------------------------------
//
void CGetObject::ServiceL()
{
PRINT( _L( "MM MTP => CGetObject::ServiceL" ) );
MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive);
// Get the objectinfo
TUint32 objectHandle = Request().Uint32( TMTPTypeRequest::ERequestParameter1 );
PRINT1( _L( "MM MTP <> CGetObject::ServiceL objectHandle = 0x%x" ), objectHandle );
// NOTE: shouldn't be deleted in destructor, don't have the ownership
iObjectInfo = iRequestChecker->GetObjectInfo( objectHandle );
if ( iObjectInfo != NULL )
{
// Get the file
GetObjectL( iObjectInfo->DesC( CMTPObjectMetaData::ESuid ) );
// Send the data (file)
SendDataL( *iFileObject );
}
else
{
// The object handle has already been checked, so an invalid handle can
// only occur if it was invalidated during a context switch between
// the validation time and now.
iError = EMTPRespCodeInvalidObjectHandle;
}
PRINT1( _L( "MM MTP <= CGetObject::ServiceL iError = 0x%x" ), iError );
}
示例9: CacheSize
void CacheSize(TUint aMin, TUint aMax)
{
SVMCacheInfo info;
if (UserSvr::HalFunction(EHalGroupVM,EVMHalGetCacheSize,&info,0) != KErrNone)
{
return;
}
if (aMin > 0 || aMax > 0)
{
if (aMin > 0)
{
info.iMinSize = aMin;
}
if (aMax > 0)
{
info.iMaxSize = aMax;
}
UserSvr::HalFunction(EHalGroupVM,EVMHalSetCacheSize,(TAny*)info.iMinSize,(TAny*)info.iMaxSize);
if (UserSvr::HalFunction(EHalGroupVM,EVMHalGetCacheSize,&info,0) != KErrNone)
{
return;
}
}
PRINT1(_L("Paging Cache min size %d"),info.iMinSize);
PRINT1(_L(" max size %d"),info.iMaxSize);
PRINT1(_L(" current size %d\n"),info.iCurrentSize);
}
示例10: PRINT
// ----------------------------------------------------------------------------
// C12keyKeyMap::ReadExtraCharacters
// The special chars that are listed in HbKeyboardSctPortrait, but not in
// HbKeyboardVirtual12Key, are mapped to key-* except the hardcoded characters
// "+*#".
// ----------------------------------------------------------------------------
TInt C12keyKeyMap::ReadExtraCharacters(const HbInputLanguage& aLanguage)
{
PRINT(_L("C12keyKeyMap::ReadExtraCharacters"));
TInt count(0); // How many new keys have been mapped
#if defined(NEW_KEYMAP_FACTORY_API)
// Takes ownership
QScopedPointer<const HbKeymap> keymap(
HbKeymapFactory::instance()->keymap(aLanguage, HbKeymapFactory::NoCaching));
#else
const HbKeymap* keymap =
HbKeymapFactory::instance()->keymap(aLanguage, HbKeymapFactory::Default);
#endif
if (keymap)
{
TInt i(0);
const HbMappedKey* mappedKey = keymap->keyForIndex(HbKeyboardSctPortrait, i);
while (mappedKey)
{
AddNewKeyToMap(EKeyStar, mappedKey->characters(HbModifierNone), count);
mappedKey = keymap->keyForIndex(HbKeyboardSctPortrait, ++i);
}
}
else
{
PRINT1(_L("no keymap for language %d"), aLanguage.language());
}
PRINT1(_L("End C12keyKeyMap::ReadExtraCharacters added %d chars"), count);
return count;
}
示例11: TRAPD
// ----------------------------------------------------------------------------
// CCsServer::RefreshConversations
// Refresh conversations.
// ----------------------------------------------------------------------------
void CCsServer::RefreshConversations()
{
// NOTE:- NO CHECK DONE NOW ON NUMBER OF PLUGINS TO KEEP IT SIMPLE.
// NOT EXPECTED TO BE MORE THAN 1 PLUGIN FOR TB 9.2.
// Delete and recreate cache.
if (iConversationCache)
{
delete iConversationCache;
iConversationCache = NULL;
iCsCachingStatus = KCachingStatusUnknown;
TRAPD(error, iConversationCache = CCsConversationCache::
NewL(iContactsManager, this));
if (error != KErrNone)
{
PRINT1 ( _L("CCsServer::RefreshConversations - Error:%d"), error );
}
}
// Notify client to refresh
NotifySessions(NULL, KConversationEventRefresh);
NotifySessions(NULL, KConversationEventListRefresh);
// Read again.
TRAPD(error, iConversationPlugin->GetConversationsL());
if (error != KErrNone)
{
PRINT1 ( _L("CCsServer::RefreshConversations - Error:%d"), error );
}
}
示例12: CHOLMOD
int CHOLMOD(reallocate_factor)
(
/* ---- input ---- */
size_t nznew, /* new # of entries in L */
/* ---- in/out --- */
cholmod_factor *L, /* factor to modify */
/* --------------- */
cholmod_common *Common
)
{
/* ---------------------------------------------------------------------- */
/* get inputs */
/* ---------------------------------------------------------------------- */
RETURN_IF_NULL_COMMON (FALSE) ;
RETURN_IF_NULL (L, FALSE) ;
RETURN_IF_XTYPE_INVALID (L, CHOLMOD_REAL, CHOLMOD_ZOMPLEX, FALSE) ;
PRINT1 (("realloc factor: xtype %d\n", L->xtype)) ;
if (L->is_super)
{
/* L must be simplicial, and not symbolic */
ERROR (CHOLMOD_INVALID, "L invalid") ;
return (FALSE) ;
}
Common->status = CHOLMOD_OK ;
PRINT1 (("realloc factor %g to %g\n", (double) L->nzmax, (double) nznew)) ;
/* ---------------------------------------------------------------------- */
/* resize (or allocate) the L->i and L->x components of the factor */
/* ---------------------------------------------------------------------- */
CHOLMOD(realloc_multiple) (nznew, 1, L->xtype, &(L->i), NULL,
&(L->x), &(L->z), &(L->nzmax), Common) ;
return (Common->status == CHOLMOD_OK) ;
}
示例13: PRINT
TBool CPredictiveSearchSynchronizer::ReadMailAddressesL(CContactItem& aContact)
{
PRINT(_L("CPredictiveSearchSynchronizer::ReadMailAddressesL"));
// SELECT value FROM comm_addr
// WHERE contact_id = [contact id value] AND type = [type value];
_LIT(KSelectMailAddrFormat, "SELECT %S FROM %S WHERE %S = %d AND %S = %d;");
const TInt KContactIdLength = 10;
const TInt KCommAddrTypeLength = 2; // CPplCommAddrTable::EEmailAddress is enum
TInt bufSize = KSelectMailAddrFormat().Length() +
KCommAddrValue().Length() +
KSqlContactCommAddrTableName().Length() +
KCommAddrContactId().Length() +
KContactIdLength +
KCommAddrType().Length() +
KCommAddrTypeLength;
HBufC* sqlStatement = HBufC::NewLC(bufSize);
sqlStatement->Des().AppendFormat(KSelectMailAddrFormat,
&KCommAddrValue,
&KSqlContactCommAddrTableName,
&KCommAddrContactId,
aContact.Id(),
&KCommAddrType,
CPplCommAddrTable::EEmailAddress);
RSqlStatement stmnt;
CleanupClosePushL(stmnt);
PRINT1(_L("prepare SQL statement:%S"), sqlStatement);
stmnt.PrepareL(iDatabase, *sqlStatement);
const TInt KValueIndex = 0;
TBool foundMailAddress(EFalse);
TInt err(KErrNone);
while ((err = stmnt.Next()) == KSqlAtRow)
{
TPtrC value;
if (stmnt.ColumnText(KValueIndex, value) == KErrNone)
{
PRINT2(_L(" id=%d, found mail address=%S"), aContact.Id(), &value);
CContactItemField* field =
CContactItemField::NewLC(KStorageTypeText, KUidContactFieldEMail);
CContactTextField* textfield = field->TextStorage();
textfield->SetTextL(value);
aContact.AddFieldL(*field); // Takes ownership
CleanupStack::Pop(field);
foundMailAddress = ETrue;
}
}
if (err != KSqlAtEnd)
{
PRINT1(_L("CPredictiveSearchSynchronizer::ReadMailAddressesL SQL err=%d"), err);
User::Leave(err);
}
CleanupStack::PopAndDestroy(&stmnt);
CleanupStack::PopAndDestroy(sqlStatement);
PRINT1(_L("CPredictiveSearchSynchronizer::ReadMailAddressesL return %d"), foundMailAddress);
return foundMailAddress;
}
示例14: cc_process_volume_usage
static void
cc_process_volume_usage(struct hid_appcol *ha, struct hid_report *hr, int value)
{
struct hid_interface *hi;
struct hid_field *hf;
int i, flags, total;
struct hid_key keycodes[MAX_KEYCODE];
uint16_t key;
/*
* HUG_VOLUME has Usage Type LC (linear control). Usually it has
* value range [-Min, Max]. Positive value n increments the volume
* by n. Negative value -n decrements the volumn by n. To fit in
* our key press/release model, HUG_VOLUME is simulated by
* pressing/releasing HUG_VOLUME_UP or HUG_VLOLUME_DOWN n times.
*/
hi = hid_appcol_get_parser_private(ha);
assert(hi != NULL);
/* Do nothing if value is 0. */
if (value == 0)
return;
/* The keyboard driver needs to know the total number of keys. */
total = 0;
hf = NULL;
while ((hf = hid_report_get_next_field(hr, hf, HID_INPUT)) != NULL) {
flags = hid_field_get_flags(hf);
if (flags & HIO_CONST)
continue;
for (i = 0; i < hf->hf_count; i++)
total++;
}
if (total >= MAX_KEYCODE)
return;
if (value < 0)
key = HUG_VOLUME_DOWN;
else
key = HUG_VOLUME_UP;
value = abs(value);
memset(keycodes, 0, sizeof(keycodes));
for (i = 0; i < value; i++) {
/* Key press. */
keycodes[0].code = key;
keycodes[0].up = HUP_CONSUMER;
kbd_input(ha, 0, keycodes, total);
if (verbose > 1)
PRINT1("hid codes: 0x%02X (HUG_VOLUME)\n",
keycodes[0].code);
/* Key release. */
keycodes[0].code = 0;
kbd_input(ha, 0, keycodes, total);
if (verbose > 1)
PRINT1("hid codes: none (HUG_VOLUME)\n");
}
}
示例15: PRINT
// ---------------------------------------------------------------------------
// CMmMtpDpMetadataAccessWrapper::GetObjectMetadataValueL
// Gets a piece of metadata from the collection
// ---------------------------------------------------------------------------
//
EXPORT_C void CMmMtpDpMetadataAccessWrapper::GetObjectMetadataValueL( const TUint16 aPropCode,
MMTPType& aNewData,
const CMTPObjectMetaData& aObjectMetaData )
{
PRINT( _L( "MM MTP => CMmMtpDpMetadataAccessWrapper::GetObjectMetadataValueL" ) );
TMPXGeneralCategory category = Category( aObjectMetaData );
switch ( category )
{
case EMPXAbstractAlbum:
if ( aPropCode == EMTPObjectPropCodeDateAdded && EMTPTypeString == aNewData.Type() )
{
TBuf<KMtpMaxDateTimeStringLength> timeStr;
MmMtpDpUtility::GetObjectDateModifiedL( iFs,
aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ),
timeStr );
PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL Date time %S" ), &timeStr );
( ( CMTPTypeString & ) aNewData ).SetL( timeStr );
break;
}
// else
// Fall through on purpoe to get from mpx
case EMPXPlaylist:
case EMPXSong:
{
iMmMtpDpMetadataMpxAccess->GetObjectMetadataValueL( aPropCode,
aNewData,
aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ),
category );
}
break;
case EMPXVideo:
if ( aPropCode == EMTPObjectPropCodeDateAdded && EMTPTypeString == aNewData.Type() )
{
TBuf<KMtpMaxDateTimeStringLength> timeStr;
MmMtpDpUtility::GetObjectDateModifiedL( iFs,
aObjectMetaData.DesC( CMTPObjectMetaData::ESuid ),
timeStr );
PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL Date time %S" ), &timeStr );
( ( CMTPTypeString & ) aNewData ).SetL( timeStr );
}
else
{
iMmMtpDpMetadataVideoAccess->GetObjectMetadataValueL( aPropCode,
aNewData,
aObjectMetaData );
}
break;
default:
// do nothing
break;
}
PRINT( _L( "MM MTP <= CMmMtpDpMetadataAccessWrapper::GetObjectMetadataValueL" ) );
}