1 /*
2  * Copyright (C) by Camila Ayres <camila@nextcloud.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12  * for more details.
13  */
14 
15 #ifndef OCSNAVIGATIONAPPSJOB_H
16 #define OCSNAVIGATIONAPPSJOB_H
17 
18 #include "ocsjob.h"
19 class QJsonDocument;
20 
21 namespace OCC {
22 
23 /**
24  * @brief The OcsAppsJob class
25  * @ingroup gui
26  *
27  * Fetching enabled apps from the OCS Apps API
28  */
29 class OcsNavigationAppsJob : public OcsJob
30 {
31     Q_OBJECT
32 public:
33     explicit OcsNavigationAppsJob(AccountPtr account);
34 
35     /**
36      * Get a list of enabled apps and external sites
37      * visible in the Navigation menu
38      */
39     void getNavigationApps();
40 
41 signals:
42     /**
43      * Result of the OCS request
44      *
45      * @param reply The reply
46      * @param statusCode the status code of the response
47      */
48     void appsJobFinished(const QJsonDocument &reply, int statusCode);
49 
50 private slots:
51     void jobDone(const QJsonDocument &reply, int statusCode);
52 };
53 }
54 
55 #endif // OCSNAVIGATIONAPPSJOB_H
56