2018-05-28 16:28:51 -04:00
|
|
|
/*******************************************************************************
|
|
|
|
* libretroshare/src/retroshare: rsiface.h *
|
|
|
|
* *
|
|
|
|
* libretroshare: retroshare core library *
|
|
|
|
* *
|
|
|
|
* Copyright 2004-2006 by Robert Fernie <retroshare@lunamutt.com> *
|
|
|
|
* *
|
|
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU Lesser General Public License as *
|
|
|
|
* published by the Free Software Foundation, either version 3 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 Lesser General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU Lesser General Public License *
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
|
|
* *
|
|
|
|
*******************************************************************************/
|
2007-11-14 22:18:48 -05:00
|
|
|
#ifndef RETROSHARE_GUI_INTERFACE_H
|
|
|
|
#define RETROSHARE_GUI_INTERFACE_H
|
|
|
|
|
2014-01-07 17:51:22 -05:00
|
|
|
#include "retroshare/rsnotify.h"
|
2007-11-14 22:18:48 -05:00
|
|
|
#include "rstypes.h"
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
class NotifyBase;
|
2014-01-07 17:51:22 -05:00
|
|
|
class RsServer;
|
2007-11-14 22:18:48 -05:00
|
|
|
class RsInit;
|
2013-06-28 17:47:25 -04:00
|
|
|
class RsPeerCryptoParams;
|
2009-03-15 18:45:40 -04:00
|
|
|
struct TurtleFileInfo ;
|
2007-11-14 22:18:48 -05:00
|
|
|
|
|
|
|
/* RsInit -> Configuration Parameters for RetroShare Startup
|
|
|
|
*/
|
|
|
|
|
|
|
|
RsInit *InitRsConfig();
|
2008-06-14 09:22:39 -04:00
|
|
|
/* extract various options for GUI */
|
2007-11-14 22:18:48 -05:00
|
|
|
const char *RsConfigDirectory(RsInit *config);
|
2008-06-14 09:22:39 -04:00
|
|
|
bool RsConfigStartMinimised(RsInit *config);
|
2007-11-14 22:18:48 -05:00
|
|
|
void CleanupRsConfig(RsInit *);
|
|
|
|
|
|
|
|
|
|
|
|
// Called First... (handles comandline options)
|
|
|
|
int InitRetroShare(int argc, char **argv, RsInit *config);
|
|
|
|
|
|
|
|
class RsControl /* The Main Interface Class - for controlling the server */
|
|
|
|
{
|
2017-02-25 18:46:02 -05:00
|
|
|
public:
|
|
|
|
/// TODO: This should return a reference instead of a pointer!
|
|
|
|
static RsControl *instance();
|
|
|
|
static void earlyInitNotificationSystem() { instance(); }
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2009-02-08 09:30:28 -05:00
|
|
|
/* Real Startup Fn */
|
|
|
|
virtual int StartupRetroShare() = 0;
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2009-02-08 09:30:28 -05:00
|
|
|
/****************************************/
|
|
|
|
/* Config */
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2009-02-08 09:30:28 -05:00
|
|
|
virtual void ConfigFinalSave( ) = 0;
|
|
|
|
virtual void rsGlobalShutDown( ) = 0;
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2009-02-08 09:30:28 -05:00
|
|
|
/****************************************/
|
|
|
|
|
2014-03-17 16:56:06 -04:00
|
|
|
virtual bool getPeerCryptoDetails(const RsPeerId& ssl_id,RsPeerCryptoParams& params) = 0;
|
2015-06-14 13:45:26 -04:00
|
|
|
virtual void getLibraries(std::list<RsLibraryInfo> &libraries) = 0;
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2014-01-07 17:51:22 -05:00
|
|
|
protected:
|
|
|
|
RsControl() {} // should not be used, hence it's private.
|
2007-11-14 22:18:48 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|