Attica::Provider
#include <Attica/Provider>
Public Types | |
enum | SortMode { Newest , Alphabetical , Rating , Downloads } |
Protected Member Functions | |
QNetworkRequest | createRequest (const QString &path) |
QNetworkRequest | createRequest (const QUrl &url) |
QUrl | createUrl (const QString &path) |
ItemJob< AccountBalance > * | doRequestAccountBalance (const QUrl &url) |
ListJob< Achievement > * | doRequestAchievementList (const QUrl &url) |
ListJob< Activity > * | doRequestActivityList (const QUrl &url) |
ItemJob< Config > * | doRequestConfig (const QUrl &url) |
ListJob< Folder > * | doRequestFolderList (const QUrl &url) |
ListJob< Forum > * | doRequestForumList (const QUrl &url) |
ListJob< Message > * | doRequestMessageList (const QUrl &url) |
ItemJob< Person > * | doRequestPerson (const QUrl &url) |
ListJob< Person > * | doRequestPersonList (const QUrl &url) |
ListJob< Topic > * | doRequestTopicList (const QUrl &url) |
Detailed Description
The Provider class represents one Open Collaboration Service provider.
Use the ProviderManager to instantiate a Provider.
Accessing functions of the Provider returns a Job class that takes care of accessing the server and parsing the result.
Provider files are xml of the form:
<provider> <id>opendesktop</id> <location>https://api.opendesktop.org/v1/</location> <name>openDesktop.org</name> <icon></icon> <termsofuse>https://opendesktop.org/terms/</termsofuse> <register>https://opendesktop.org/usermanager/new.php</register> <services> <person ocsversion="1.3" > <friend ocsversion="1.3" > <message ocsversion="1.3" > <activity ocsversion="1.3" > <content ocsversion="1.3" > <fan ocsversion="1.3" > <knowledgebase ocsversion="1.3" > <event ocsversion="1.3" > <comment ocsversion="1.2" > </services> </provider>
The server provides the services specified in the services section, not necessarily all of them.
Definition at line 96 of file provider.h.
Member Enumeration Documentation
◆ SortMode
enum Attica::Provider::SortMode |
Definition at line 164 of file provider.h.
Constructor & Destructor Documentation
◆ Provider() [1/2]
Provider::Provider | ( | ) |
Default construct a Provider.
Please note that this provider is incomplete and never valid.
Definition at line 174 of file provider.cpp.
◆ Provider() [2/2]
Provider::Provider | ( | const Provider & | other | ) |
Definition at line 179 of file provider.cpp.
◆ ~Provider()
Provider::~Provider | ( | ) |
Definition at line 298 of file provider.cpp.
Member Function Documentation
◆ achievementServiceVersion()
QString Provider::achievementServiceVersion | ( | ) | const |
Version of the achievement part of the API.
Definition at line 1776 of file provider.cpp.
◆ activityServiceVersion()
QString Provider::activityServiceVersion | ( | ) | const |
Version of the activity part of the API.
Definition at line 1781 of file provider.cpp.
◆ additionalAgentInformation()
QString Provider::additionalAgentInformation | ( | ) | const |
The custom identifier sent along with requests.
- Returns
- The custom identifier
- Since
- 5.66
Definition at line 335 of file provider.cpp.
◆ addNewAchievement()
ItemPostJob< Achievement > * Provider::addNewAchievement | ( | const QString & | id, |
const Achievement & | newAchievement ) |
Add a new achievement.
- Parameters
-
id id of the achievement entry achievement The new Achievement added
- Returns
- item post job for adding the new achievement
Definition at line 560 of file provider.cpp.
◆ addNewComment()
ItemPostJob< Comment > * Provider::addNewComment | ( | const Comment::Type | commentType, |
const QString & | id, | ||
const QString & | id2, | ||
const QString & | parentId, | ||
const QString & | subject, | ||
const QString & | message ) |
Add a new comment.
- Parameters
-
commentType type of the comment
- See also
- CommentType (content / forum / knowledgebase / event)
- Parameters
-
id id of the content entry where you want to get the comments is from id2 id of the sub content entry where you want to get the comments is from parentId the id of the parent comment if the new comment is a reply subject title of the comment message text of the comment
- Returns
- item post job for adding the new comment
Definition at line 1625 of file provider.cpp.
◆ addNewContent()
ItemPostJob< Content > * Provider::addNewContent | ( | const Category & | category, |
const Content & | newContent ) |
Definition at line 1265 of file provider.cpp.
◆ approveFriendship()
Definition at line 1028 of file provider.cpp.
◆ baseUrl()
QUrl Provider::baseUrl | ( | ) | const |
A url that identifies this provider.
This should be used as identifier when referring to this provider but you don't want to use the full provider object.
Definition at line 302 of file provider.cpp.
◆ becomeFan()
Definition at line 1398 of file provider.cpp.
◆ cancelBuildServiceJob()
PostJob * Provider::cancelBuildServiceJob | ( | const BuildServiceJob & | job | ) |
Cancel a job.
Setting the ID on the build service parameter is enough for it to work.
- Parameters
-
job Buildservicejob to cancel on the server, needs at least id set.
Definition at line 858 of file provider.cpp.
◆ cancelFriendship()
Definition at line 1046 of file provider.cpp.
◆ checkLogin()
Test if the server accepts the login/password.
This function does not actually set the credentials. Use saveCredentials for that purpose.
- Parameters
-
user the user (login) name password the password
- Returns
- the job that will contain the success of the login as metadata
Definition at line 393 of file provider.cpp.
◆ commentServiceVersion()
QString Provider::commentServiceVersion | ( | ) | const |
Version of the comments part of the API.
Definition at line 1785 of file provider.cpp.
◆ contentServiceVersion()
QString Provider::contentServiceVersion | ( | ) | const |
Version of the content part of the API.
Definition at line 1789 of file provider.cpp.
◆ createBuildServiceJob()
PostJob * Provider::createBuildServiceJob | ( | const BuildServiceJob & | job | ) |
Create a new job for a given project on a given buildservice for a given target.
Those three items are mandatory for the job to succeed.
- Parameters
-
job Buildservicejob to create on the server
Definition at line 870 of file provider.cpp.
◆ createProject()
Post modifications to a Project on the server.
The resulting project ID can be found in the Attica::MetaData of the finished() PostJob. You can retrieve it using Attica::MetaData::resultingProjectId().
- Parameters
-
project Project to create on the server
Definition at line 737 of file provider.cpp.
◆ createRemoteAccount()
PostJob * Provider::createRemoteAccount | ( | const RemoteAccount & | account | ) |
Create a new remote account, an account for a build service instance which is stored in the OCS service in order to authenticate with the build service instance.
Type, Type ID, login and password are mandatory.
- Parameters
-
account RemoteAccount to create on the server
Definition at line 932 of file provider.cpp.
◆ createRequest() [1/2]
|
protected |
Definition at line 1721 of file provider.cpp.
◆ createRequest() [2/2]
|
protected |
Definition at line 1698 of file provider.cpp.
◆ createUrl()
Definition at line 1692 of file provider.cpp.
◆ declineFriendship()
Definition at line 1037 of file provider.cpp.
◆ deleteAchievement()
DeleteJob * Provider::deleteAchievement | ( | const QString & | contentId, |
const QString & | achievementId ) |
Deletes an achievement on the server.
The achievement passed as an argument doesn't need complete information as just the id() is used.
- Parameters
-
achievement Achievement to delete on the server.
Definition at line 628 of file provider.cpp.
◆ deleteContent()
Definition at line 1312 of file provider.cpp.
◆ deleteDownloadFile()
Definition at line 1338 of file provider.cpp.
◆ deletePreviewImage()
Definition at line 1367 of file provider.cpp.
◆ deleteProject()
Deletes a project on the server.
The project passed as an argument doesn't need complete information as just the id() is used.
- Parameters
-
project Project to delete on the server.
Definition at line 755 of file provider.cpp.
◆ deleteRemoteAccount()
Deletes a remote account stored on the OCS server.
- Parameters
-
id The ID of the remote account on the OCS instance.
Definition at line 981 of file provider.cpp.
◆ doRequestAccountBalance()
|
protected |
Definition at line 1736 of file provider.cpp.
◆ doRequestAchievementList()
|
protected |
Definition at line 1746 of file provider.cpp.
◆ doRequestActivityList()
Definition at line 1751 of file provider.cpp.
◆ doRequestConfig()
Definition at line 1726 of file provider.cpp.
◆ doRequestFolderList()
Definition at line 1756 of file provider.cpp.
◆ doRequestForumList()
Definition at line 1761 of file provider.cpp.
◆ doRequestMessageList()
Definition at line 1771 of file provider.cpp.
◆ doRequestPerson()
Definition at line 1731 of file provider.cpp.
◆ doRequestPersonList()
Definition at line 1741 of file provider.cpp.
◆ doRequestTopicList()
Definition at line 1766 of file provider.cpp.
◆ downloadLink()
ItemJob< DownloadItem > * Provider::downloadLink | ( | const QString & | contentId, |
const QString & | itemId = QStringLiteral("1") ) |
Definition at line 1487 of file provider.cpp.
◆ editAchievement()
PutJob * Provider::editAchievement | ( | const QString & | contentId, |
const QString & | achievementId, | ||
const Achievement & | achievement ) |
Post modifications to an Achievement on the server.
- Parameters
-
achievement Achievement to update on the server
Definition at line 592 of file provider.cpp.
◆ editContent()
ItemPostJob< Content > * Provider::editContent | ( | const Category & | updatedCategory, |
const QString & | contentId, | ||
const Content & | updatedContent ) |
Definition at line 1282 of file provider.cpp.
◆ editProject()
Post modifications to a Project on the server.
- Parameters
-
project Project to update on the server
Definition at line 746 of file provider.cpp.
◆ editRemoteAccount()
PostJob * Provider::editRemoteAccount | ( | const RemoteAccount & | account | ) |
Edit an existing remote account.
- Parameters
-
account RemoteAccount to create on the server
Definition at line 951 of file provider.cpp.
◆ fanServiceVersion()
QString Provider::fanServiceVersion | ( | ) | const |
Version of the fan part of the API.
Definition at line 1793 of file provider.cpp.
◆ forumServiceVersion()
QString Provider::forumServiceVersion | ( | ) | const |
Version of the forum part of the API.
Definition at line 1797 of file provider.cpp.
◆ friendServiceVersion()
QString Provider::friendServiceVersion | ( | ) | const |
Version of the friend part of the API.
Definition at line 1801 of file provider.cpp.
◆ getRegisterAccountUrl()
const QString & Provider::getRegisterAccountUrl | ( | ) | const |
Definition at line 434 of file provider.cpp.
◆ hasAchievementService()
bool Provider::hasAchievementService | ( | ) | const |
Test if the server supports the achievement part of the API.
Definition at line 1818 of file provider.cpp.
◆ hasActivityService()
bool Provider::hasActivityService | ( | ) | const |
Test if the server supports the activity part of the API.
Definition at line 1823 of file provider.cpp.
◆ hasCommentService()
bool Provider::hasCommentService | ( | ) | const |
Test if the server supports the comments part of the API.
Definition at line 1827 of file provider.cpp.
◆ hasContentService()
bool Provider::hasContentService | ( | ) | const |
Test if the server supports the content part of the API.
Definition at line 1831 of file provider.cpp.
◆ hasCredentials() [1/2]
bool Provider::hasCredentials | ( | ) |
Definition at line 350 of file provider.cpp.
◆ hasCredentials() [2/2]
bool Provider::hasCredentials | ( | ) | const |
Test if the provider has user name/password available.
This does not yet open kwallet in case the KDE plugin is used.
- Returns
- true if the provider has login information
Definition at line 359 of file provider.cpp.
◆ hasFanService()
bool Provider::hasFanService | ( | ) | const |
Test if the server supports the fan part of the API.
Definition at line 1835 of file provider.cpp.
◆ hasForumService()
bool Provider::hasForumService | ( | ) | const |
Test if the server supports the forum part of the API.
Definition at line 1839 of file provider.cpp.
◆ hasFriendService()
bool Provider::hasFriendService | ( | ) | const |
Test if the server supports the friend part of the API.
Definition at line 1843 of file provider.cpp.
◆ hasKnowledgebaseService()
bool Provider::hasKnowledgebaseService | ( | ) | const |
Test if the server supports the knowledgebase part of the API.
Definition at line 1847 of file provider.cpp.
◆ hasMessageService()
bool Provider::hasMessageService | ( | ) | const |
Test if the server supports the message part of the API.
Definition at line 1851 of file provider.cpp.
◆ hasPersonService()
bool Provider::hasPersonService | ( | ) | const |
Test if the server supports the person part of the API.
Definition at line 1855 of file provider.cpp.
◆ icon()
QUrl Attica::Provider::icon | ( | ) | const |
An icon used to visually identify this provider.
- Returns
- A URL for an icon image (or an invalid URL if one was not defined by the provider)
- Since
- 5.85
Definition at line 345 of file provider.cpp.
◆ inviteFriend()
Definition at line 1017 of file provider.cpp.
◆ isEnabled()
bool Provider::isEnabled | ( | ) | const |
Test if the provider is enabled by the settings.
The application can choose to ignore this, but the user settings should be respected.
Definition at line 312 of file provider.cpp.
◆ isValid()
bool Provider::isValid | ( | ) | const |
Returns true if the provider has been set up and can be used.
Definition at line 307 of file provider.cpp.
◆ knowledgebaseServiceVersion()
QString Provider::knowledgebaseServiceVersion | ( | ) | const |
Version of the knowledgebase part of the API.
Definition at line 1805 of file provider.cpp.
◆ loadCredentials()
Load user name and password from the store.
Attica will remember the loaded values and use them from this point on.
- Parameters
-
user reference that returns the user name password reference that returns the password
- Returns
- if credentials could be loaded
Definition at line 368 of file provider.cpp.
◆ messageServiceVersion()
QString Provider::messageServiceVersion | ( | ) | const |
Version of the message part of the API.
Definition at line 1809 of file provider.cpp.
◆ name()
QString Provider::name | ( | ) | const |
A name for the provider that can be displayed to the user.
Definition at line 340 of file provider.cpp.
◆ operator=()
Definition at line 292 of file provider.cpp.
◆ personServiceVersion()
QString Provider::personServiceVersion | ( | ) | const |
Version of the person part of the API.
Definition at line 1813 of file provider.cpp.
◆ postActivity()
Definition at line 1006 of file provider.cpp.
◆ postLocation()
PostJob * Provider::postLocation | ( | qreal | latitude, |
qreal | longitude, | ||
const QString & | city = QString(), | ||
const QString & | country = QString() ) |
Definition at line 1055 of file provider.cpp.
◆ postMessage()
Definition at line 1109 of file provider.cpp.
◆ postTopic()
PostJob * Provider::postTopic | ( | const QString & | forumId, |
const QString & | subject, | ||
const QString & | content ) |
Definition at line 1474 of file provider.cpp.
◆ publishBuildJob()
PostJob * Provider::publishBuildJob | ( | const BuildServiceJob & | buildjob, |
const Publisher & | publisher ) |
Publish the result of a completed build job to a publisher.
- Returns
- ItemJob receiving data
Definition at line 801 of file provider.cpp.
◆ registerAccount()
PostJob * Provider::registerAccount | ( | const QString & | id, |
const QString & | password, | ||
const QString & | mail, | ||
const QString & | firstName, | ||
const QString & | lastName ) |
Definition at line 417 of file provider.cpp.
◆ requestAccountBalance()
ItemJob< AccountBalance > * Provider::requestAccountBalance | ( | ) |
Definition at line 459 of file provider.cpp.
◆ requestAchievements()
ListJob< Achievement > * Provider::requestAchievements | ( | const QString & | contentId, |
const QString & | achievementId, | ||
const QString & | userId ) |
Get a list of achievements.
- Returns
- ListJob listing Achievements
Definition at line 547 of file provider.cpp.
◆ requestActivities()
Definition at line 668 of file provider.cpp.
◆ requestBuildService()
ItemJob< BuildService > * Provider::requestBuildService | ( | const QString & | id | ) |
Get the information for a specific build service instance.
- Returns
- ItemJob receiving data
Definition at line 764 of file provider.cpp.
◆ requestBuildServiceJob()
ItemJob< BuildServiceJob > * Provider::requestBuildServiceJob | ( | const QString & | id | ) |
Get the information for a specific build service job, such as status and progress.
- Returns
- ItemJob receiving and containing the data
Definition at line 827 of file provider.cpp.
◆ requestBuildServiceJobOutput()
ItemJob< BuildServiceJobOutput > * Provider::requestBuildServiceJobOutput | ( | const QString & | id | ) |
Get the build output for a specific build service job.
- Returns
- ItemJob receiving and containing the output data
Definition at line 816 of file provider.cpp.
◆ requestBuildServiceJobs()
ListJob< BuildServiceJob > * Provider::requestBuildServiceJobs | ( | const Project & | project | ) |
Get a list of build service projects.
- Returns
- ListJob listing BuildServiceJobs
Definition at line 910 of file provider.cpp.
◆ requestBuildServices()
ListJob< BuildService > * Provider::requestBuildServices | ( | ) |
Get a list of build service build services.
- Returns
- ListJob listing BuildServices
Definition at line 888 of file provider.cpp.
◆ requestCategories()
Get a list of categories (such as wallpaper)
- Returns
- the categories of the server
Definition at line 1122 of file provider.cpp.
◆ requestComments()
ListJob< Comment > * Provider::requestComments | ( | const Comment::Type | commentType, |
const QString & | id, | ||
const QString & | id2, | ||
int | page, | ||
int | pageSize ) |
Request a list of comments for a content / forum / knowledgebase / event.
- Parameters
-
comment::Type type of the comment
- See also
- Comment::Type (content / forum / knowledgebase / event)
- Parameters
-
id id of the content entry where you want to get the comments is from id2 id of the content entry where you want to get the comments is from page request nth page in the list of results pageSize requested size of pages when calculating the list of results
- Returns
- list job for the comments results
Definition at line 1602 of file provider.cpp.
◆ requestConfig()
Fetches server config.
- Returns
- The job responsible for fetching data
Definition at line 407 of file provider.cpp.
◆ requestContent()
Retrieve a single content.
- Parameters
-
contentId the id of the content
- Returns
- job that retrieves the content object
Definition at line 1254 of file provider.cpp.
◆ requestDistributions()
ListJob< Distribution > * Provider::requestDistributions | ( | ) |
Get a list of distributions (such as Ark, Debian)
- Returns
- the licenses available from the server
Definition at line 1154 of file provider.cpp.
◆ requestEvent() [1/2]
ListJob< Event > * Provider::requestEvent | ( | const QString & | country, |
const QString & | search, | ||
const QDate & | startAt, | ||
Provider::SortMode | mode, | ||
int | page, | ||
int | pageSize ) |
Definition at line 1560 of file provider.cpp.
◆ requestEvent() [2/2]
Definition at line 1550 of file provider.cpp.
◆ requestFans()
ListJob< Person > * Provider::requestFans | ( | const QString & | contentId, |
uint | page = 0, | ||
uint | pageSize = 10 ) |
Definition at line 1410 of file provider.cpp.
◆ requestFolders()
Definition at line 1069 of file provider.cpp.
◆ requestForums()
Definition at line 1426 of file provider.cpp.
◆ requestFriends()
ListJob< Person > * Provider::requestFriends | ( | const QString & | id, |
int | page = 0, | ||
int | pageSize = 20 ) |
Definition at line 502 of file provider.cpp.
◆ requestHomePageTypes()
ListJob< HomePageType > * Provider::requestHomePageTypes | ( | ) |
Get a list of home page types (such as blog, Facebook)
- Returns
- the licenses available from the server
Definition at line 1165 of file provider.cpp.
◆ requestKnowledgeBaseEntry()
ItemJob< KnowledgeBaseEntry > * Provider::requestKnowledgeBaseEntry | ( | const QString & | id | ) |
Definition at line 1498 of file provider.cpp.
◆ requestLicenses()
Get a list of licenses (such as GPL)
- Returns
- the licenses available from the server
Definition at line 1143 of file provider.cpp.
◆ requestMessage()
Definition at line 1100 of file provider.cpp.
◆ requestMessages() [1/2]
Definition at line 1078 of file provider.cpp.
◆ requestMessages() [2/2]
Definition at line 1087 of file provider.cpp.
◆ requestPerson()
Definition at line 439 of file provider.cpp.
◆ requestPersonSearchByLocation()
ListJob< Person > * Provider::requestPersonSearchByLocation | ( | qreal | latitude, |
qreal | longitude, | ||
qreal | distance = 0.0, | ||
int | page = 0, | ||
int | pageSize = 20 ) |
Definition at line 482 of file provider.cpp.
◆ requestPersonSearchByName()
Definition at line 469 of file provider.cpp.
◆ requestPersonSelf()
Definition at line 449 of file provider.cpp.
◆ requestPrivateData() [1/2]
|
inline |
Fetches all stored private data.
- Returns
- The job responsible for fetching data
Definition at line 329 of file provider.h.
◆ requestPrivateData() [2/2]
ItemJob< PrivateData > * Provider::requestPrivateData | ( | const QString & | app, |
const QString & | key = QString() ) |
Fetches the a given attribute from an OCS-compliant server.
- Parameters
-
app The application name key The key of the attribute to fetch (optional)
- Returns
- The job that is responsible for fetching the data
Definition at line 1681 of file provider.cpp.
◆ requestProject()
◆ requestProjects()
Get a list of build service projects.
- Returns
- ListJob listing Projects
Definition at line 679 of file provider.cpp.
◆ requestPublisher()
Get the information for a specific publisher.
- Returns
- ItemJob receiving data
Definition at line 774 of file provider.cpp.
◆ requestPublishers()
Get a list of publishers.
- Returns
- ListJob listing Publishers
Definition at line 899 of file provider.cpp.
◆ requestReceivedInvitations()
Definition at line 532 of file provider.cpp.
◆ requestRemoteAccount()
ItemJob< RemoteAccount > * Provider::requestRemoteAccount | ( | const QString & | id | ) |
Get a remote account by its ID.
- Parameters
-
id The ID of the remote account
Definition at line 970 of file provider.cpp.
◆ requestRemoteAccounts()
ListJob< RemoteAccount > * Provider::requestRemoteAccounts | ( | ) |
Get a list of remote accounts, account for a build service instance which is stored in the OCS service in order to authenticate with the build service instance.
- Returns
- ListJob listing RemoteAccounts
Definition at line 921 of file provider.cpp.
◆ requestSentInvitations()
Definition at line 517 of file provider.cpp.
◆ requestTopics()
ListJob< Topic > * Provider::requestTopics | ( | const QString & | forum, |
const QString & | search, | ||
const QString & | description, | ||
Provider::SortMode | mode, | ||
int | page, | ||
int | pageSize ) |
Definition at line 1442 of file provider.cpp.
◆ resetAchievementProgress()
Definition at line 655 of file provider.cpp.
◆ saveCredentials()
Sets (and remembers) user name and password for this provider.
To remove the data an empty username should be passed.
- Parameters
-
user the user (login) name password the password
- Returns
- if credentials could be saved
Definition at line 382 of file provider.cpp.
◆ savePublisherField()
PostJob * Provider::savePublisherField | ( | const Project & | project, |
const PublisherField & | field ) |
Save the value of a single publishing field.
- Returns
- PostJob*
Definition at line 785 of file provider.cpp.
◆ searchContents() [1/2]
ListJob< Content > * Provider::searchContents | ( | const Category::List & | categories, |
const QString & | person, | ||
const Distribution::List & | distributions, | ||
const License::List & | licenses, | ||
const QString & | search = QString(), | ||
SortMode | sortMode = Rating, | ||
uint | page = 0, | ||
uint | pageSize = 10 ) |
Request a list of Contents.
More complete version. Note that categories
is not optional. If left empty, no results will be returned. An empty search string search
returns the top n items.
- Parameters
-
categories categories to search in person the person-id that created the contents distributions list of distributions to filter by, if empty no filtering by distribution is done licenses list of licenses to filter by, if empty no filtering by license is done search optional search string (in name/description of the content) mode sorting mode page request nth page in the list of results pageSize requested size of pages when calculating the list of results
- Returns
- list job for the search results
Definition at line 1187 of file provider.cpp.
◆ searchContents() [2/2]
ListJob< Content > * Provider::searchContents | ( | const Category::List & | categories, |
const QString & | search = QString(), | ||
SortMode | mode = Rating, | ||
uint | page = 0, | ||
uint | pageSize = 10 ) |
Request a list of Contents.
Note that categories
is not optional. If left empty, no results will be returned. An empty search string search
returns the top n items.
- Parameters
-
categories categories to search in search optional search string (in name/description of the content) mode sorting mode page request nth page in the list of results pageSize requested size of pages when calculating the list of results
- Returns
- list job for the search results
Definition at line 1176 of file provider.cpp.
◆ searchContentsByPerson()
ListJob< Content > * Provider::searchContentsByPerson | ( | const Category::List & | categories, |
const QString & | person, | ||
const QString & | search = QString(), | ||
SortMode | mode = Rating, | ||
uint | page = 0, | ||
uint | pageSize = 10 ) |
Request a list of Contents.
Like
- See also
- searchContents, but only contents created by one person.
- Parameters
-
person the person-id that created the contents.
Definition at line 1182 of file provider.cpp.
◆ searchKnowledgeBase()
ListJob< KnowledgeBaseEntry > * Provider::searchKnowledgeBase | ( | const Content & | content, |
const QString & | search, | ||
Provider::SortMode | sortMode, | ||
int | page, | ||
int | pageSize ) |
Definition at line 1509 of file provider.cpp.
◆ setAchievementProgress()
PostJob * Provider::setAchievementProgress | ( | const QString & | id, |
const QVariant & | progress, | ||
const QDateTime & | timestamp ) |
Definition at line 641 of file provider.cpp.
◆ setAdditionalAgentInformation()
void Provider::setAdditionalAgentInformation | ( | const QString & | additionalInformation | ) |
Set a custom identifier for your application (sent along with the requests as the http agent header in addition to the application name and version).
For example, you might have an application named SomeApplication, version 23, and wish to send along the data "lookandfeel.knsrc". Call this function, and the resulting agent header would be:
SomeApplication/23 (+lookandfeel.knsrc)
If you do not set this (or set it to an empty string), the agent string becomes
SomeApplication/23
- Parameters
-
additionalAgentInformation The extra string
- Since
- 5.66
Definition at line 330 of file provider.cpp.
◆ setDownloadFile()
PostJob * Provider::setDownloadFile | ( | const QString & | contentId, |
const QString & | fileName, | ||
const QByteArray & | payload ) |
Definition at line 1324 of file provider.cpp.
◆ setEnabled()
void Provider::setEnabled | ( | bool | enabled | ) |
Definition at line 321 of file provider.cpp.
◆ setPreviewImage()
PostJob * Provider::setPreviewImage | ( | const QString & | contentId, |
const QString & | previewId, | ||
const QString & | fileName, | ||
const QByteArray & | image ) |
Upload an image file as preview for the content.
- Parameters
-
contentId previewId each content can have previews with the id 1,2 or 3 payload the image file
Definition at line 1350 of file provider.cpp.
◆ setPrivateData()
PostJob * Provider::setPrivateData | ( | const QString & | app, |
const QString & | key, | ||
const QString & | value ) |
Sets the value of an attribute.
- Parameters
-
app The application name key The key of the attribute value The new value of the attribute
- Returns
- The job responsible for setting data
Definition at line 1667 of file provider.cpp.
◆ uploadTarballToBuildService()
PostJob * Provider::uploadTarballToBuildService | ( | const QString & | projectId, |
const QString & | fileName, | ||
const QByteArray & | payload ) |
Upload a tarball to the buildservice.
- Parameters
-
projectId The ID of the project this source file belongs to payload A reference to the complete file data
- Returns
- A postjob to keep keep track of the upload
Definition at line 991 of file provider.cpp.
◆ voteForComment()
Vote a comment item.
- Parameters
-
id the comment id which this voting is for rating the rating, must be between 0 (bad) and 100 (good)
- Returns
- the post job for this voting
Definition at line 1654 of file provider.cpp.
◆ voteForContent()
Vote for a content item.
- Parameters
-
contentId the content which this voting is for rating - the rating, must be between 0 (bad) and 100 (good)
- Returns
- the post job for this voting
Definition at line 1380 of file provider.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 1 2024 18:48:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.