mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-30 12:26:39 -05:00
Removing old services, serialisers and other references for:
- forums - channels - tunnel - blog - gamelauncher. - distrib. Note this majorly breaks the GUI, for the moment. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@6683 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
212b4c44c9
commit
a6cf738371
47 changed files with 15 additions and 14890 deletions
|
|
@ -1,154 +0,0 @@
|
|||
#ifndef RS_BLOG_GUI_INTERFACE_H
|
||||
#define RS_BLOG_GUI_INTERFACE_H
|
||||
|
||||
/*
|
||||
* libretroshare/src/rsiface: rsblogs.h
|
||||
*
|
||||
* RetroShare C++ Interface.
|
||||
*
|
||||
* Copyright 2008 by Robert Fernie.
|
||||
*
|
||||
* 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 "retroshare@lunamutt.com".
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "rstypes.h"
|
||||
#include "rsdistrib.h" /* For FLAGS */
|
||||
|
||||
class BlogInfo
|
||||
{
|
||||
public:
|
||||
BlogInfo() {}
|
||||
std::string blogId;
|
||||
std::wstring blogName;
|
||||
std::wstring blogDesc;
|
||||
|
||||
uint32_t blogFlags;
|
||||
uint32_t pop;
|
||||
|
||||
unsigned char* pngChanImage;
|
||||
uint32_t pngImageLen;
|
||||
|
||||
time_t lastPost;
|
||||
};
|
||||
|
||||
class BlogMsgInfo
|
||||
{
|
||||
public:
|
||||
BlogMsgInfo() {}
|
||||
std::string blogId;
|
||||
std::string msgId;
|
||||
/// this has a value if replying to another msg
|
||||
std::string msgIdReply;
|
||||
|
||||
unsigned int msgflags;
|
||||
|
||||
std::wstring subject;
|
||||
std::wstring msg;
|
||||
time_t ts;
|
||||
|
||||
std::list<FileInfo> files;
|
||||
uint32_t count;
|
||||
uint64_t size;
|
||||
};
|
||||
|
||||
|
||||
class BlogMsgSummary
|
||||
{
|
||||
public:
|
||||
BlogMsgSummary() {}
|
||||
std::string blogId;
|
||||
std::string msgId;
|
||||
|
||||
uint32_t msgflags;
|
||||
|
||||
std::wstring subject;
|
||||
std::wstring msg;
|
||||
std::string msgIdReply;
|
||||
uint32_t count; /* file count */
|
||||
time_t ts;
|
||||
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const BlogInfo &info);
|
||||
std::ostream &operator<<(std::ostream &out, const BlogMsgSummary &info);
|
||||
std::ostream &operator<<(std::ostream &out, const BlogMsgInfo &info);
|
||||
|
||||
class RsBlogs;
|
||||
extern RsBlogs *rsBlogs;
|
||||
|
||||
class RsBlogs
|
||||
{
|
||||
public:
|
||||
|
||||
RsBlogs() { return; }
|
||||
virtual ~RsBlogs() { return; }
|
||||
|
||||
/****************************************/
|
||||
|
||||
/*!
|
||||
* Checks if the group a blod id belongs to has changed
|
||||
*/
|
||||
virtual bool blogsChanged(std::list<std::string> &blogIds) = 0;
|
||||
|
||||
|
||||
virtual std::string createBlog(std::wstring blogName, std::wstring blogDesc, uint32_t blogFlags,
|
||||
unsigned char* pngImageData, uint32_t imageSize) = 0;
|
||||
|
||||
virtual bool getBlogInfo(std::string cId, BlogInfo &ci) = 0;
|
||||
virtual bool getBlogList(std::list<BlogInfo> &chanList) = 0;
|
||||
virtual bool getBlogMsgList(std::string cId, std::list<BlogMsgSummary> &msgs) = 0;
|
||||
|
||||
/*!
|
||||
* Retrieves a specific blog Msg based on group Id and message Id
|
||||
*/
|
||||
virtual bool getBlogMessage(std::string cId, std::string mId, BlogMsgInfo &msg) = 0;
|
||||
|
||||
/*!
|
||||
* Can send blog message to user
|
||||
* @param info the message
|
||||
*/
|
||||
virtual bool BlogMessageSend(BlogMsgInfo &info) = 0;
|
||||
|
||||
/*!
|
||||
* Allows user to subscribe to a blog via group ID
|
||||
* @param cId group id
|
||||
* @param subscribe determine subscription based on value
|
||||
*/
|
||||
virtual bool blogSubscribe(std::string cId, bool subscribe) = 0;
|
||||
|
||||
/*!
|
||||
* Commenting on other user's blogs, ensure field info has a valid info.msgIdReply has valid msg id, this
|
||||
* points to which message the blog reply is replying to
|
||||
*/
|
||||
virtual bool BlogMessageReply(BlogMsgInfo &info) = 0;
|
||||
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
virtual bool isReply(BlogMsgInfo &info) = 0;
|
||||
/****************************************/
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,283 +0,0 @@
|
|||
#ifndef RS_CHANNEL_GUI_INTERFACE_H
|
||||
#define RS_CHANNEL_GUI_INTERFACE_H
|
||||
|
||||
/*
|
||||
* libretroshare/src/rsiface: rschannels.h
|
||||
*
|
||||
* RetroShare C++ Interface.
|
||||
*
|
||||
* Copyright 2008 by Robert Fernie.
|
||||
*
|
||||
* 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 "retroshare@lunamutt.com".
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "rstypes.h"
|
||||
#include "rsdistrib.h" /* For FLAGS */
|
||||
|
||||
#define CHANNEL_MSG_STATUS_MASK 0x000f
|
||||
#define CHANNEL_MSG_STATUS_READ 0x0001
|
||||
#define CHANNEL_MSG_STATUS_UNREAD_BY_USER 0x0002
|
||||
#define CHANNEL_MSG_STATUS_DOWLOADED 0x0004
|
||||
|
||||
|
||||
//! Stores information for a give channel id
|
||||
/*!
|
||||
* Stores all information for a given channel id
|
||||
*/
|
||||
class ChannelInfo
|
||||
{
|
||||
public:
|
||||
ChannelInfo() : autoDownload(false), pngChanImage(NULL), pngImageLen(0)
|
||||
{}
|
||||
std::string channelId;
|
||||
std::wstring channelName;
|
||||
std::wstring channelDesc;
|
||||
|
||||
uint32_t channelFlags;
|
||||
uint32_t pop; /// popularity
|
||||
bool autoDownload;
|
||||
|
||||
unsigned char* pngChanImage;
|
||||
uint32_t pngImageLen;
|
||||
|
||||
time_t lastPost;
|
||||
std::string destination_directory ;
|
||||
};
|
||||
|
||||
//! for storing a channel msgs thumbnail picture
|
||||
class ChannelMsgThumbnail
|
||||
{
|
||||
public:
|
||||
ChannelMsgThumbnail() : image_thumbnail(NULL), im_thumbnail_size(0) {}
|
||||
|
||||
unsigned char* image_thumbnail;
|
||||
int im_thumbnail_size;
|
||||
};
|
||||
|
||||
//! Stores information on a message within a channel
|
||||
class ChannelMsgInfo
|
||||
{
|
||||
public:
|
||||
ChannelMsgInfo () : count(0), size(0) {}
|
||||
std::string channelId;
|
||||
std::string msgId;
|
||||
|
||||
unsigned int msgflags;
|
||||
|
||||
std::wstring subject;
|
||||
std::wstring msg;
|
||||
time_t ts; /// time stamp
|
||||
|
||||
std::list<FileInfo> files;
|
||||
uint32_t count; /// file count
|
||||
uint64_t size; /// size of all files
|
||||
|
||||
ChannelMsgThumbnail thumbnail;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//! gives a more brief account of a channel message than channelMsgInfo
|
||||
class ChannelMsgSummary
|
||||
{
|
||||
public:
|
||||
ChannelMsgSummary() : count(0) {}
|
||||
std::string channelId;
|
||||
std::string msgId;
|
||||
|
||||
uint32_t msgflags;
|
||||
|
||||
std::wstring subject;
|
||||
std::wstring msg;
|
||||
uint32_t count; /// file count
|
||||
time_t ts; /// time stamp
|
||||
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const ChannelInfo &info);
|
||||
std::ostream &operator<<(std::ostream &out, const ChannelMsgSummary &info);
|
||||
std::ostream &operator<<(std::ostream &out, const ChannelMsgInfo &info);
|
||||
|
||||
class RsChannels;
|
||||
extern RsChannels *rsChannels;
|
||||
|
||||
/*!
|
||||
* retroshare interface to the channels distributed group service
|
||||
* Channels user to create feeds similar to RSS feed where you can share files
|
||||
* with other users, when you subscribe to a channel you immediately begin downloading
|
||||
* the file shared on that channel. Channel feeds are shared anonymously
|
||||
*/
|
||||
class RsChannels
|
||||
{
|
||||
public:
|
||||
|
||||
RsChannels() { return; }
|
||||
virtual ~RsChannels() { return; }
|
||||
|
||||
/****************************************/
|
||||
|
||||
/*!
|
||||
* returns a list of channel id that have changed (i.e. received new message, chan descr update)
|
||||
* @param chanIds this is populated with channel ids that have changed
|
||||
*/
|
||||
virtual bool channelsChanged(std::list<std::string> &chanIds) = 0;
|
||||
|
||||
/*!
|
||||
* @param chanName name of the channel
|
||||
* @param chanDesc a short description for the created channel
|
||||
* @param chanFlags admin details on created channel group see rsdistrib.h for flags types
|
||||
* @param pngImageData point at image data in PNG format
|
||||
* @param imageSize size of the image data
|
||||
*/
|
||||
virtual std::string createChannel(std::wstring chanName, std::wstring chanDesc, uint32_t chanFlags,
|
||||
unsigned char* pngImageData, uint32_t imageSize) = 0;
|
||||
|
||||
/*!
|
||||
* retrieve channel information
|
||||
* @param cId channel id
|
||||
* @param ci channel info is store here
|
||||
*/
|
||||
virtual bool getChannelInfo(const std::string &cId, ChannelInfo &ci) = 0;
|
||||
|
||||
/*!
|
||||
* @param chanList populated channelinfo for all channels
|
||||
*/
|
||||
virtual bool getChannelList(std::list<ChannelInfo> &chanList) = 0;
|
||||
|
||||
/*!
|
||||
* get a message summary list for a given channel id
|
||||
* @param cId channel id user wants messages for
|
||||
* @param msgs summary of messages for the given cId
|
||||
*/
|
||||
virtual bool getChannelMsgList(const std::string &cId, std::list<ChannelMsgSummary> &msgs) = 0;
|
||||
|
||||
/*!
|
||||
* retrieve more comprehensive message info given channel id and message id
|
||||
*/
|
||||
virtual bool getChannelMessage(const std::string &cId, const std::string &mId, ChannelMsgInfo &msg) = 0;
|
||||
|
||||
/*!
|
||||
* set message status
|
||||
* @param cId channel id
|
||||
* @param mId message id
|
||||
* @param status status to set
|
||||
* @param statusMask bitmask to modify
|
||||
*/
|
||||
virtual bool setMessageStatus(const std::string& cId,const std::string& mId, const uint32_t status, const uint32_t statusMask) = 0;
|
||||
|
||||
/*!
|
||||
* set message status
|
||||
* @param cId channel id
|
||||
* @param mId message id
|
||||
* @param status status
|
||||
*/
|
||||
virtual bool getMessageStatus(const std::string& cId, const std::string& mId, uint32_t& status) = 0;
|
||||
|
||||
/*!
|
||||
* count the new and unread messages
|
||||
* @param cId channel id
|
||||
* @param newCount count of new messages
|
||||
* @param unreadCount count of unread messages
|
||||
*/
|
||||
virtual bool getMessageCount(const std::string &cId, unsigned int &newCount, unsigned int &unreadCount) = 0;
|
||||
|
||||
/*!
|
||||
* send message contain in message info to the id indicated within it (make sure you set the channel id of the message info)
|
||||
* @param info message to be sent
|
||||
*/
|
||||
virtual bool ChannelMessageSend(ChannelMsgInfo &info) = 0;
|
||||
|
||||
/*!
|
||||
* @param cId the channel id
|
||||
* @param subscribe set to true if you want to subscribe and to false to unsubscribe
|
||||
* @param set true to allow autodownload of new content and false otherwise, ignored when second param is false
|
||||
*/
|
||||
virtual bool channelSubscribe(const std::string &cId, bool subscribe, bool autoDl) = 0;
|
||||
|
||||
/*!
|
||||
* This hashes a file which is not already shared by client or his peers,
|
||||
* The file is copied into the channels directory if its not too large (> 100mb)
|
||||
* @param path This is full path to file
|
||||
* @param channel Id
|
||||
*/
|
||||
virtual bool channelExtraFileHash(const std::string &path, const std::string &chId, FileInfo& fInfo) = 0;
|
||||
|
||||
/*!
|
||||
* This removes hashed extra files, and also removes channels directory copy if it exists
|
||||
* @param chId channel id
|
||||
*/
|
||||
virtual bool channelExtraFileRemove(const std::string &hash, const std::string &chId) = 0;
|
||||
|
||||
/*!
|
||||
* Restores channel private keys for channel in the event keys stored in configuration files are lost
|
||||
* @param chId channel id to restore keys for
|
||||
*/
|
||||
virtual bool channelRestoreKeys(const std::string &chId) = 0;
|
||||
|
||||
/*!
|
||||
* shares keys with peers
|
||||
*@param chId the channel for which private publish keys will be shared
|
||||
*@param peers peers in this list will be sent keys
|
||||
*
|
||||
*/
|
||||
virtual bool channelShareKeys(const std::string &chId, std::list<std::string>& peers) = 0;
|
||||
/****************************************/
|
||||
|
||||
/*!
|
||||
* allows peers to change information for the channel:
|
||||
* can only change channel image, descriptions and name
|
||||
*
|
||||
*/
|
||||
virtual bool channelEditInfo(const std::string &chId, ChannelInfo &ci) = 0;
|
||||
|
||||
|
||||
/*!
|
||||
* get list of channels for which private publish key is available
|
||||
* @param grpIds list of channels for which private publish key is available
|
||||
*/
|
||||
virtual void getPubKeysAvailableGrpIds(std::list<std::string>& chanIds) = 0;
|
||||
|
||||
/*!
|
||||
* set the channel so that it does not auto download any more
|
||||
* @param chId the channel id to set for
|
||||
* @param set to true to enable auto dl and false to disable
|
||||
*/
|
||||
virtual bool channelSetAutoDl(const std::string& chId, bool autoDl) = 0;
|
||||
|
||||
// sets the defautl destination directory for files downloaded in this channel.
|
||||
// Default is "" which means Downloads/
|
||||
|
||||
virtual bool channelSetDestinationDirectory(const std::string& cid,const std::string& dir) = 0 ;
|
||||
|
||||
/*!
|
||||
* get what autoDl is set to for the given channel id
|
||||
* @param chId id of channel to get autoDl status for
|
||||
* @param autoDl
|
||||
* @return false if channel cannot be found
|
||||
*/
|
||||
virtual bool channelGetAutoDl(const std::string& chId, bool& autoDl) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
#ifndef RS_DISTRIB_GUI_INTERFACE_H
|
||||
#define RS_DISTRIB_GUI_INTERFACE_H
|
||||
|
||||
/*
|
||||
* libretroshare/src/rsiface: rsdistrib.h
|
||||
*
|
||||
* RetroShare C++ Interface.
|
||||
*
|
||||
* Copyright 2007-2008 by Robert Fernie.
|
||||
*
|
||||
* 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 "retroshare@lunamutt.com".
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#define RS_DISTRIB_PRIVACY_MASK 0x0000000f /* who can publish & view */
|
||||
#define RS_DISTRIB_AUTHEN_MASK 0x000000f0 /* how to publish */
|
||||
#define RS_DISTRIB_LISTEN_MASK 0x00000f00 /* distribution flags */
|
||||
#define RS_DISTRIB_UPDATE_MASK 0x0000f000 /* if sending a group info update */
|
||||
#define RS_DISTRIB_MISC_MASK 0x00ff0000 /* if sending a group info update */
|
||||
|
||||
#define RS_DISTRIB_PUBLIC 0x00000001 /* anyone can publish */
|
||||
#define RS_DISTRIB_PRIVATE 0x00000002 /* anyone with key can publish */
|
||||
#define RS_DISTRIB_ENCRYPTED 0x00000004 /* need publish key to view */
|
||||
|
||||
#define RS_DISTRIB_AUTHEN_REQ 0x00000010 /* you must sign messages */
|
||||
#define RS_DISTRIB_AUTHEN_ANON 0x00000020 /* you can send anonymous messages */
|
||||
|
||||
#define RS_DISTRIB_ADMIN 0x00000100
|
||||
#define RS_DISTRIB_PUBLISH 0x00000200
|
||||
#define RS_DISTRIB_SUBSCRIBED 0x00000400
|
||||
|
||||
#define RS_DISTRIB_UPDATE 0x00001000
|
||||
|
||||
/* don't know if this should go with the above flags, as it message specific, and not a group settings.
|
||||
* As it is currently not stored any configuration, it can be changed.
|
||||
*/
|
||||
|
||||
#define RS_DISTRIB_MISSING_MSG 0x00010000
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,166 +0,0 @@
|
|||
#ifndef RS_FORUM_GUI_INTERFACE_H
|
||||
#define RS_FORUM_GUI_INTERFACE_H
|
||||
|
||||
/*
|
||||
* libretroshare/src/rsiface: rsforums.h
|
||||
*
|
||||
* RetroShare C++ Interface.
|
||||
*
|
||||
* Copyright 2007-2008 by Robert Fernie.
|
||||
*
|
||||
* 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 "retroshare@lunamutt.com".
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "rstypes.h"
|
||||
#include "rsdistrib.h" /* For FLAGS */
|
||||
|
||||
#define FORUM_MSG_STATUS_MASK 0x000f
|
||||
#define FORUM_MSG_STATUS_READ 0x0001
|
||||
#define FORUM_MSG_STATUS_UNREAD_BY_USER 0x0002
|
||||
|
||||
class ForumInfo
|
||||
{
|
||||
public:
|
||||
ForumInfo()
|
||||
{
|
||||
forumFlags = 0 ;
|
||||
subscribeFlags = 0 ;
|
||||
pop = 0 ;
|
||||
lastPost = 0 ;
|
||||
}
|
||||
std::string forumId;
|
||||
std::wstring forumName;
|
||||
std::wstring forumDesc;
|
||||
|
||||
uint32_t forumFlags;
|
||||
uint32_t subscribeFlags;
|
||||
|
||||
uint32_t pop;
|
||||
|
||||
time_t lastPost;
|
||||
};
|
||||
|
||||
class ForumMsgInfo
|
||||
{
|
||||
public:
|
||||
ForumMsgInfo()
|
||||
{
|
||||
msgflags = 0 ;
|
||||
ts = childTS = status = 0 ;
|
||||
}
|
||||
std::string forumId;
|
||||
std::string threadId;
|
||||
std::string parentId;
|
||||
std::string msgId;
|
||||
|
||||
std::string srcId; /* if Authenticated -> signed here */
|
||||
|
||||
unsigned int msgflags;
|
||||
|
||||
std::wstring title;
|
||||
std::wstring msg;
|
||||
time_t ts;
|
||||
time_t childTS;
|
||||
uint32_t status;
|
||||
};
|
||||
|
||||
|
||||
class ThreadInfoSummary
|
||||
{
|
||||
public:
|
||||
ThreadInfoSummary()
|
||||
{
|
||||
msgflags = 0 ;
|
||||
count = 0 ;
|
||||
ts = childTS = 0 ;
|
||||
}
|
||||
std::string forumId;
|
||||
std::string threadId;
|
||||
std::string parentId;
|
||||
std::string msgId;
|
||||
|
||||
uint32_t msgflags;
|
||||
|
||||
std::wstring title;
|
||||
std::wstring msg;
|
||||
int count; /* file count */
|
||||
time_t ts;
|
||||
time_t childTS;
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const ForumInfo &info);
|
||||
std::ostream &operator<<(std::ostream &out, const ThreadInfoSummary &info);
|
||||
std::ostream &operator<<(std::ostream &out, const ForumMsgInfo &info);
|
||||
|
||||
class RsForums;
|
||||
extern RsForums *rsForums;
|
||||
|
||||
class RsForums
|
||||
{
|
||||
public:
|
||||
|
||||
RsForums() { return; }
|
||||
virtual ~RsForums() { return; }
|
||||
|
||||
/****************************************/
|
||||
|
||||
virtual bool forumsChanged(std::list<std::string> &forumIds) = 0;
|
||||
|
||||
|
||||
virtual std::string createForum(const std::wstring &forumName, const std::wstring &forumDesc, uint32_t forumFlags) = 0;
|
||||
|
||||
virtual bool getForumInfo(const std::string &fId, ForumInfo &fi) = 0;
|
||||
|
||||
/*!
|
||||
* allows peers to change information for the forum:
|
||||
* can only change name and descriptions
|
||||
*
|
||||
*/
|
||||
virtual bool setForumInfo(const std::string &fId, ForumInfo &fi) = 0;
|
||||
|
||||
virtual bool getForumList(std::list<ForumInfo> &forumList) = 0;
|
||||
virtual bool getForumThreadList(const std::string &fId, std::list<ThreadInfoSummary> &msgs) = 0;
|
||||
virtual bool getForumThreadMsgList(const std::string &fId, const std::string &pId, std::list<ThreadInfoSummary> &msgs) = 0;
|
||||
virtual bool getForumMessage(const std::string &fId, const std::string &mId, ForumMsgInfo &msg) = 0;
|
||||
virtual bool setMessageStatus(const std::string& fId,const std::string& mId, const uint32_t status, const uint32_t statusMask) = 0;
|
||||
virtual bool getMessageStatus(const std::string& fId, const std::string& mId, uint32_t& status) = 0;
|
||||
virtual bool ForumMessageSend(ForumMsgInfo &info) = 0;
|
||||
virtual bool forumRestoreKeys(const std::string& fId) = 0;
|
||||
virtual bool forumSubscribe(const std::string &fId, bool subscribe) = 0;
|
||||
|
||||
/*!
|
||||
* shares keys with peers
|
||||
*@param fId the forum for which private publish keys will be shared
|
||||
*@param peers list of peers to be sent keys
|
||||
*
|
||||
*/
|
||||
virtual bool forumShareKeys(std::string fId, std::list<std::string>& peers) = 0;
|
||||
|
||||
virtual bool getMessageCount(const std::string &fId, unsigned int &newCount, unsigned int &unreadCount) = 0;
|
||||
|
||||
/****************************************/
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
#ifndef RS_GAME_GUI_INTERFACE_H
|
||||
#define RS_GAME_GUI_INTERFACE_H
|
||||
|
||||
/*
|
||||
* libretroshare/src/rsiface: rsgame.h
|
||||
*
|
||||
* RetroShare C++ Interface.
|
||||
*
|
||||
* Copyright 2007-2008 by Robert Fernie.
|
||||
*
|
||||
* 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 "retroshare@lunamutt.com".
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "rstypes.h"
|
||||
|
||||
|
||||
class RsGameLauncher;
|
||||
|
||||
/* declare single RsIface for everyone to use! */
|
||||
|
||||
extern RsGameLauncher *rsGameLauncher;
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <inttypes.h>
|
||||
|
||||
class RsGameInfo
|
||||
{
|
||||
public:
|
||||
|
||||
std::string gameId;
|
||||
std::string serverId;
|
||||
|
||||
std::string gameType;
|
||||
std::wstring gameName;
|
||||
std::string serverName;
|
||||
std::string status;
|
||||
uint16_t numPlayers;
|
||||
|
||||
};
|
||||
|
||||
class RsGamePeer
|
||||
{
|
||||
public:
|
||||
std::string id;
|
||||
bool invite;
|
||||
bool interested;
|
||||
bool play;
|
||||
};
|
||||
|
||||
class RsGameDetail
|
||||
{
|
||||
public:
|
||||
std::string gameId;
|
||||
std::string gameType;
|
||||
std::wstring gameName;
|
||||
|
||||
bool areServer; /* are we the server? */
|
||||
std::string serverId; /* if not, who is? */
|
||||
std::string serverName;
|
||||
|
||||
std::string status;
|
||||
|
||||
uint16_t numPlayers;
|
||||
std::map<std::string, RsGamePeer> gamers;
|
||||
|
||||
};
|
||||
|
||||
class RsGameLauncher
|
||||
{
|
||||
public:
|
||||
|
||||
/* server commands */
|
||||
virtual std::string createGame(uint32_t gameType, std::wstring name) = 0;
|
||||
virtual bool deleteGame(std::string gameId) = 0;
|
||||
virtual bool inviteGame(std::string gameId) = 0;
|
||||
virtual bool playGame(std::string gameId) = 0;
|
||||
//virtual bool quitGame(std::string gameId) = 0;
|
||||
|
||||
virtual bool invitePeer(std::string gameId, std::string peerId) = 0;
|
||||
virtual bool uninvitePeer(std::string gameId, std::string peerId) = 0;
|
||||
virtual bool confirmPeer(std::string gameId, std::string peerId,
|
||||
int16_t pos = -1) = 0;
|
||||
virtual bool unconfirmPeer(std::string gameId, std::string peerId) = 0;
|
||||
|
||||
/* client commands */
|
||||
virtual bool interestedPeer(std::string gameId) = 0;
|
||||
virtual bool uninterestedPeer(std::string gameId) = 0;
|
||||
|
||||
/* get details */
|
||||
virtual bool getGameList(std::list<RsGameInfo> &gameList) = 0;
|
||||
virtual bool getGameDetail(std::string gameId, RsGameDetail &detail) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -61,9 +61,6 @@ const uint32_t RS_CHAT_TABBED_WINDOW = 0x0008;
|
|||
const uint32_t RS_CHAT_BLINK = 0x0010;
|
||||
|
||||
const uint32_t RS_FEED_TYPE_PEER = 0x0010;
|
||||
const uint32_t RS_FEED_TYPE_CHAN = 0x0020;
|
||||
const uint32_t RS_FEED_TYPE_FORUM = 0x0040;
|
||||
const uint32_t RS_FEED_TYPE_BLOG = 0x0080;
|
||||
const uint32_t RS_FEED_TYPE_CHAT = 0x0100;
|
||||
const uint32_t RS_FEED_TYPE_MSG = 0x0200;
|
||||
const uint32_t RS_FEED_TYPE_FILES = 0x0400;
|
||||
|
|
@ -79,18 +76,6 @@ const uint32_t RS_FEED_ITEM_SEC_AUTH_DENIED = RS_FEED_TYPE_SECURITY | 0x0002;
|
|||
const uint32_t RS_FEED_ITEM_SEC_UNKNOWN_IN = RS_FEED_TYPE_SECURITY | 0x0003;
|
||||
const uint32_t RS_FEED_ITEM_SEC_UNKNOWN_OUT = RS_FEED_TYPE_SECURITY | 0x0004;
|
||||
|
||||
const uint32_t RS_FEED_ITEM_CHAN_NEW = RS_FEED_TYPE_CHAN | 0x0001;
|
||||
const uint32_t RS_FEED_ITEM_CHAN_UPDATE = RS_FEED_TYPE_CHAN | 0x0002;
|
||||
const uint32_t RS_FEED_ITEM_CHAN_MSG = RS_FEED_TYPE_CHAN | 0x0003;
|
||||
|
||||
const uint32_t RS_FEED_ITEM_FORUM_NEW = RS_FEED_TYPE_FORUM | 0x0001;
|
||||
const uint32_t RS_FEED_ITEM_FORUM_UPDATE = RS_FEED_TYPE_FORUM | 0x0002;
|
||||
const uint32_t RS_FEED_ITEM_FORUM_MSG = RS_FEED_TYPE_FORUM | 0x0003;
|
||||
|
||||
const uint32_t RS_FEED_ITEM_BLOG_NEW = RS_FEED_TYPE_BLOG | 0x0001;
|
||||
const uint32_t RS_FEED_ITEM_BLOG_UPDATE = RS_FEED_TYPE_BLOG | 0x0002;
|
||||
const uint32_t RS_FEED_ITEM_BLOG_MSG = RS_FEED_TYPE_BLOG | 0x0003;
|
||||
|
||||
const uint32_t RS_FEED_ITEM_CHAT_NEW = RS_FEED_TYPE_CHAT | 0x0001;
|
||||
const uint32_t RS_FEED_ITEM_MESSAGE = RS_FEED_TYPE_MSG | 0x0001;
|
||||
const uint32_t RS_FEED_ITEM_FILES_NEW = RS_FEED_TYPE_FILES | 0x0001;
|
||||
|
|
|
|||
|
|
@ -79,12 +79,12 @@ const ServicePermissionFlags RS_SERVICE_PERM_ALL = RS_SERVICE_PERM_TURTL
|
|||
|
||||
/* Connect state */
|
||||
const uint32_t RS_PEER_CONNECTSTATE_OFFLINE = 0;
|
||||
const uint32_t RS_PEER_CONNECTSTATE_TRYING_TUNNEL = 1;
|
||||
|
||||
const uint32_t RS_PEER_CONNECTSTATE_TRYING_TCP = 2;
|
||||
const uint32_t RS_PEER_CONNECTSTATE_TRYING_UDP = 3;
|
||||
const uint32_t RS_PEER_CONNECTSTATE_CONNECTED_TCP = 4;
|
||||
const uint32_t RS_PEER_CONNECTSTATE_CONNECTED_UDP = 5;
|
||||
const uint32_t RS_PEER_CONNECTSTATE_CONNECTED_TUNNEL = 6;
|
||||
|
||||
const uint32_t RS_PEER_CONNECTSTATE_CONNECTED_UNKNOWN = 7;
|
||||
|
||||
/* Error codes for certificate cleaning and cert parsing. Numbers should not overlap. */
|
||||
|
|
@ -129,7 +129,6 @@ const uint32_t RS_NET_CONN_TRANS_UDP_PROXY = 0x00000040;
|
|||
const uint32_t RS_NET_CONN_TRANS_UDP_RELAY = 0x00000080;
|
||||
|
||||
const uint32_t RS_NET_CONN_TRANS_OTHER_MASK = 0x00000f00;
|
||||
const uint32_t RS_NET_CONN_TRANS_TUNNEL = 0x00000100;
|
||||
|
||||
const uint32_t RS_NET_CONN_TRANS_UNKNOWN = 0x00001000;
|
||||
|
||||
|
|
@ -319,9 +318,7 @@ class RsPeers
|
|||
|
||||
virtual void getIPServersList(std::list<std::string>& ip_servers) = 0;
|
||||
virtual void allowServerIPDetermination(bool) = 0;
|
||||
virtual void allowTunnelConnection(bool) = 0;
|
||||
virtual bool getAllowServerIPDetermination() = 0 ;
|
||||
virtual bool getAllowTunnelConnection() = 0 ;
|
||||
|
||||
/* Auth Stuff */
|
||||
virtual std::string GetRetroshareInvite(const std::string& ssl_id,bool include_signatures,bool old_format = false) = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue