KNSCore

KNSCore Namespace Reference

Classes

class  Author
 
class  CommentsModel
 
class  DownloadManager
 
class  Engine
 
class  EntryInternal
 
class  EntryWrapper
 
class  Installation
 
class  KPackageJob
 
class  Provider
 
class  Question
 
class  QuestionListener
 
class  QuestionManager
 
class  Security
 
class  TagsFilterChecker
 
class  XmlLoader
 

Typedefs

typedef QFlags< JobFlag > JobFlags
 
typedef QHash< const Provider *, ProviderPrivate * > ProviderPrivateHash
 

Enumerations

enum  ErrorCode {
  UnknownError, NetworkError, OcsError, ConfigFileError,
  ProviderError, InstallationError, ImageError, AdoptionError
}
 
enum  JobFlag {
  None = 0, HideProgressInfo = 1, Resume = 2, Overwrite = 4,
  DefaultFlags = None
}
 
enum  LoadType { Reload, NoReload }
 

Functions

QDomElement addElement (QDomDocument &doc, QDomElement &parent, const QString &tag, const QString &value)
 
static ProviderPrivate * d (const Provider *provider)
 
static void delete_d (const Provider *provider)
 
QList< std::shared_ptr< KNSCore::Comment > > getCommentsList (const Attica::Comment::List &comments, std::shared_ptr< KNSCore::Comment > parent)
 
QDebug operator<< (QDebug dbg, const Provider::SearchRequest &search)
 
uint qHash (const KNSCore::EntryInternal &entry)
 
KNEWSTUFFCORE_EXPORT QString replaceBBCode (const QString &unformattedText)
 

Variables

static const int PreviewHeight = 72
 
static const int PreviewWidth = 96
 

Detailed Description

Contains the core functionality for handling interaction with NewStuff providers.

The entrypoint for most things will be the creation of an instance of KNSCore::Engine which will other classes then either use or get instantiated from directly.

NOTE: When implementing anything on top of KNSCore, without using either KNS3 or the Qt Quick components, you will need to implement a custom QuestionListener (see that class for instructions)

See also
KNSCore::Engine
KNSCore::ItemsModel
KNSCore::QuestionListener

Enumeration Type Documentation

An enumeration of specific error conditions which might occur and which users of KNewStuff would want to react to.

It is used by both the Engine and Provider classes.

Since
5.53 TODO: KF6 do not repeat entry properties in the QVariantList
Enumerator
UnknownError 

An unknown error (this should not be used, an error report of this nature should be considered a bug)

NetworkError 

A network error. In signalErrorCode, this will be accompanied by the QtNetwork error code in the metadata.

OcsError 

An error reported by the OCS API server. In signalErrorCode, this will be accompanied by the OCS error code in the metadata.

ConfigFileError 

The configuration file is missing or somehow incorrect. The configuration file filename will be held in the metadata.

ProviderError 

A provider has failed to load or initialize. The provider file URL or provider URL will be held in the metadata.

InstallationError 

Installation of a content item has failed.

ImageError 

Loading an image has failed. The entry name and preview type which failed will be held in the metadata as a QVariantList.

AdoptionError 

Adopting one entry has failed. The adoption command will be in the metadata as a QVariantList.

Definition at line 25 of file errorcode.h.

Function Documentation

QList<std::shared_ptr<KNSCore::Comment> > KNSCore::getCommentsList ( const Attica::Comment::List &  comments,
std::shared_ptr< KNSCore::Comment parent 
)

TODO KF6 QList is discouraged, and we'll probably want to switch this (and the rest of the KNS library) to QVector instead.

Definition at line 351 of file atticaprovider.cpp.

QString KNSCore::replaceBBCode ( const QString unformattedText)

function to remove bb code formatting that opendesktop sends

Definition at line 735 of file entryinternal.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 22:42:22 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.