Logo Search packages:      
Sourcecode: qapt version File versions  Download package

bool QApt::Package::isTrusted (  )  const

Member function that returns whether or not the package is signed with a trusted GPG signature.

Returns:
true if trusted

false if untrusted or the package has a version of 0

Definition at line 837 of file package.cpp.

Referenced by isSupported().

{
    pkgCache::VerIterator Ver;
    pkgDepCache::StateCache & State = (*d->depCache)[*d->packageIter];
    Ver = State.CandidateVerIter(*d->depCache);
    if (Ver == 0) {
        return false;
    }

    pkgSourceList *Sources = d->backend->packageSourceList();
    for (pkgCache::VerFileIterator i = Ver.FileList(); i.end() == false; ++i)
    {
        pkgIndexFile *Index;
        if (Sources->FindIndex(i.File(),Index) == false) {
           continue;
        }
        if (Index->IsTrusted()) {
            return true;
        }
    }

    return false;
}


Generated by  Doxygen 1.6.0   Back to index