2018-01-26 15:11:35 +03:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Camila Ayres <camila@nextcloud.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*/
|
|
|
|
|
2018-02-19 22:51:56 +03:00
|
|
|
#ifndef OCSNAVIGATIONAPPSJOB_H
|
|
|
|
#define OCSNAVIGATIONAPPSJOB_H
|
2018-01-26 15:11:35 +03:00
|
|
|
|
|
|
|
#include "ocsjob.h"
|
|
|
|
class QJsonDocument;
|
|
|
|
|
|
|
|
namespace OCC {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief The OcsAppsJob class
|
|
|
|
* @ingroup gui
|
|
|
|
*
|
|
|
|
* Fetching enabled apps from the OCS Apps API
|
|
|
|
*/
|
2018-02-19 22:51:56 +03:00
|
|
|
class OcsNavigationAppsJob : public OcsJob
|
2018-01-26 15:11:35 +03:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2018-02-19 22:51:56 +03:00
|
|
|
explicit OcsNavigationAppsJob(AccountPtr account);
|
2018-01-26 15:11:35 +03:00
|
|
|
|
|
|
|
/**
|
2018-02-19 22:51:56 +03:00
|
|
|
* Get a list of enabled apps and external sites
|
|
|
|
* visible in the Navigation menu
|
2018-01-26 15:11:35 +03:00
|
|
|
*/
|
2018-02-19 22:51:56 +03:00
|
|
|
void getNavigationApps();
|
2018-01-26 15:11:35 +03:00
|
|
|
|
|
|
|
signals:
|
|
|
|
/**
|
|
|
|
* Result of the OCS request
|
|
|
|
*
|
|
|
|
* @param reply The reply
|
2018-04-09 11:54:30 +03:00
|
|
|
* @param statusCode the status code of the response
|
2018-01-26 15:11:35 +03:00
|
|
|
*/
|
2018-04-09 11:54:30 +03:00
|
|
|
void appsJobFinished(const QJsonDocument &reply, int statusCode);
|
2018-01-26 15:11:35 +03:00
|
|
|
|
|
|
|
private slots:
|
2018-04-09 11:54:30 +03:00
|
|
|
void jobDone(const QJsonDocument &reply, int statusCode);
|
2018-01-26 15:11:35 +03:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2018-02-19 22:51:56 +03:00
|
|
|
#endif // OCSNAVIGATIONAPPSJOB_H
|