mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-05 05:12:51 -04:00
turtle dev. Worked on serialisation, mainly, and connexion to gui.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1076 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
decb7442bc
commit
29bd4795fd
8 changed files with 364 additions and 26 deletions
65
libretroshare/src/rsiface/rsturtle.h
Normal file
65
libretroshare/src/rsiface/rsturtle.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
#ifndef RETROSHARE_TURTLE_GUI_INTERFACE_H
|
||||
#define RETROSHARE_TURTLE_GUI_INTERFACE_H
|
||||
|
||||
/*
|
||||
* libretroshare/src/rsiface: rsturtle.h
|
||||
*
|
||||
* RetroShare C++ Interface.
|
||||
*
|
||||
* Copyright 2009 by Cyril Soler.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License Version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA.
|
||||
*
|
||||
* Please report all bugs and problems to "csoler@users.sourceforge.net"
|
||||
*
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
||||
class RsTurtle;
|
||||
extern RsTurtle *rsTurtle ;
|
||||
|
||||
typedef uint32_t TurtleRequestId ;
|
||||
|
||||
// Interface class for turtle hopping.
|
||||
//
|
||||
// This class mainly interacts with the turtle router, that is responsible
|
||||
// for routing turtle packets between peers, accepting/forwarding search
|
||||
// requests and dowloading files.
|
||||
//
|
||||
// As seen from here, the interface is really simple.
|
||||
//
|
||||
class RsTurtle
|
||||
{
|
||||
public:
|
||||
RsTurtle() {}
|
||||
virtual ~RsTurtle() {}
|
||||
|
||||
// Lauches a search request through the pipes, and immediately returns
|
||||
// the request id, which will be further used by the gui to store results
|
||||
// as they come back.
|
||||
//
|
||||
virtual TurtleRequestId turtleSearch(const std::string& match_string) = 0 ;
|
||||
|
||||
// Launches a complete download file operation: diggs one or more
|
||||
// tunnels. Launches an exception if an error occurs during the
|
||||
// initialization process.
|
||||
//
|
||||
virtual void turtleDownload(const std::string& file_hash) = 0 ;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue