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


C++ TEntry::IsReadOnly方法代码示例

本文整理汇总了C++中TEntry::IsReadOnly方法的典型用法代码示例。如果您正苦于以下问题:C++ TEntry::IsReadOnly方法的具体用法?C++ TEntry::IsReadOnly怎么用?C++ TEntry::IsReadOnly使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TEntry的用法示例。


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

示例1: fillFromTEntry

void QFileSystemMetaData::fillFromTEntry(const TEntry& entry)
{
    entryFlags &= ~(QFileSystemMetaData::SymbianTEntryFlags);
    knownFlagsMask |= QFileSystemMetaData::SymbianTEntryFlags;
    //Symbian doesn't have unix type file permissions
    entryFlags |= QFileSystemMetaData::ReadPermissions;
    if(!entry.IsReadOnly()) {
        entryFlags |= QFileSystemMetaData::WritePermissions;
    }
    //set the type
    if(entry.IsDir())
        entryFlags |= (QFileSystemMetaData::DirectoryType | QFileSystemMetaData::ExecutePermissions);
    else
        entryFlags |= QFileSystemMetaData::FileType;

    //set the attributes
    entryFlags |= QFileSystemMetaData::ExistsAttribute;
    if(entry.IsHidden())
        entryFlags |= QFileSystemMetaData::HiddenAttribute;

#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
    size_ = entry.FileSize();
#else
    size_ = (TUint)(entry.iSize);
#endif

    modificationTime_ = entry.iModified;
}
开发者ID:AlekSi,项目名称:phantomjs,代码行数:28,代码来源:qfilesystemengine_symbian.cpp

示例2: ResetAttributes

// ---------------------------------------------------------------------------
// CRfsFileMan::ResetAttributes
// ---------------------------------------------------------------------------
//
void CRfsFileMan::ResetAttributes( const TDesC& aFullPath, const TEntry& aEntry )
    {
    FUNC_LOG;

    if ( aEntry.IsReadOnly() )
        {
        TInt err = iFs.SetEntry(
            aFullPath, aEntry.iModified, 0, KEntryAttReadOnly | KEntryAttHidden );
        ERROR( err, "Failed to reset attributes" );
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:15,代码来源:rfsfileman.cpp

示例3: FormatEntry

void FormatEntry(TDes& aBuffer, const TEntry& aEntry)
	{
	_LIT(KEntryDetails,"Entry details: ");
	_LIT(KReadOnly," Read-only");
	_LIT(KHidden," Hidden");
	_LIT(KSystem," System");
	_LIT(KDirectory," Directory");
	_LIT(KArchive," Archive");
	_LIT(KNewLIne,"\n");
	aBuffer.Append(KEntryDetails);
	if(aEntry.IsReadOnly())
		aBuffer.Append(KReadOnly);
	if(aEntry.IsHidden())
		aBuffer.Append(KHidden);
	if(aEntry.IsSystem())
		aBuffer.Append(KSystem);
	if(aEntry.IsDir())
		aBuffer.Append(KDirectory);
	if(aEntry.IsArchive())
		aBuffer.Append(KArchive);		
	aBuffer.Append(KNewLIne);
	}
开发者ID:huellif,项目名称:symbian-example,代码行数:22,代码来源:Attributes.cpp

示例4: CheckRequestL

/**
Verify request
*/
TMTPResponseCode CMTPSetObjectPropValue::CheckRequestL()
{
    TMTPResponseCode responseCode = CMTPRequestProcessor::CheckRequestL();

    TUint32 handle = Request().Uint32(TMTPTypeRequest::ERequestParameter1);
    CMTPObjectMetaData* meta = iRequestChecker->GetObjectInfo(handle);
    __ASSERT_DEBUG(meta, Panic(EMTPDpObjectNull));

    if(!iSingleton.StorageMgr().IsReadWriteStorage(meta->Uint(CMTPObjectMetaData::EStorageId)))
    {
        responseCode = EMTPRespCodeAccessDenied;
    }

    if(responseCode == EMTPRespCodeOK)
    {
        TUint32 propCode = Request().Uint32(TMTPTypeRequest::ERequestParameter2);

        if(propCode != EMTPObjectPropCodeAssociationType && propCode != EMTPObjectPropCodeAssociationDesc)
        {
            const TInt count = sizeof(KMTPDpSupportedProperties) / sizeof(TUint16);
            TInt i = 0;
            for(i = 0; i < count; i++)
            {
                if(KMTPDpSupportedProperties[i] == propCode
                        && IsPropCodeReadonly(propCode))
                    // Object property code supported, but cann't be set.
                {
                    responseCode = EMTPRespCodeAccessDenied;
                    break;
                }
                else if(KMTPDpSupportedProperties[i] == propCode)
                    // Object property code supported and can be set.
                {
                    break;
                }
            }
            if(i == count)
            {
                responseCode = EMTPRespCodeInvalidObjectPropCode;
            }
        }
        else if(meta->Uint(CMTPObjectMetaData::EFormatCode) != EMTPFormatCodeAssociation)
        {
            responseCode = EMTPRespCodeInvalidObjectFormatCode;
        }
    }
    else
    {
        const TDesC& suid(meta->DesC(CMTPObjectMetaData::ESuid));
        TEntry entry;
        LEAVEIFERROR( iFramework.Fs().Entry(suid, entry),
                      OstTraceExt1( TRACE_ERROR, CMTPSETOBJECTPROPVALUE_CHECKREQUESTL, "Gets entry details for %S failed!", suid));
        //According to spec, there are 4 statuses: No Protection; Read-only; Read-only data; Non-transferrable data
        //Currently, we only use FS's Read-only attribute to support No Protection and Read-only statuses.
        //so if the attribute is read-only, we will return EMTPRespCodeAccessDenied.
        if (entry.IsReadOnly())
        {
            responseCode = EMTPRespCodeAccessDenied;
        }
    }

    return responseCode;
}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:66,代码来源:cmtpsetobjectpropvalue.cpp


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