mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
Improved the bootstrap Stun system.
* searching for STUN ID's continues until RS_STUN_FOUND_MIN are found (10). * abandon STUN search if Ext or Upnp mode. * add Bootstrap IDs to rear of mStunList. (bugfix) Force saving of certificates after "oldFormat" loading. Corrected printStunList() fn call. Added a notification system: (1) libretroshare System Notifications. - System notification if Firewall Status is bad. (2) PopUp messages. - Popup for a connected peer. - Popup for a new message. * New interface (to be revised). git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@376 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
08860b25e6
commit
0bdc3522a6
13 changed files with 579 additions and 26 deletions
76
libretroshare/src/rsiface/rsnotify.h
Normal file
76
libretroshare/src/rsiface/rsnotify.h
Normal file
|
@ -0,0 +1,76 @@
|
|||
#ifndef RS_NOTIFY_GUI_INTERFACE_H
|
||||
#define RS_NOTIFY_GUI_INTERFACE_H
|
||||
|
||||
/*
|
||||
* libretroshare/src/rsiface: rsnotify.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 <map>
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
|
||||
class RsNotify;
|
||||
extern RsNotify *rsNotify;
|
||||
|
||||
const uint32_t RS_SYS_ERROR = 0x0001;
|
||||
const uint32_t RS_SYS_WARNING = 0x0002;
|
||||
const uint32_t RS_SYS_INFO = 0x0004;
|
||||
|
||||
const uint32_t RS_POPUP_MSG = 0x0001;
|
||||
const uint32_t RS_POPUP_CHAT = 0x0002;
|
||||
const uint32_t RS_POPUP_CALL = 0x0004;
|
||||
const uint32_t RS_POPUP_CONNECT = 0x0008;
|
||||
|
||||
|
||||
class RsNotify
|
||||
{
|
||||
public:
|
||||
|
||||
RsNotify() { return; }
|
||||
virtual ~RsNotify() { return; }
|
||||
|
||||
/* Output for retroshare-gui */
|
||||
virtual bool NotifySysMessage(uint32_t &sysid, uint32_t &type,
|
||||
std::string &title, std::string &msg) = 0;
|
||||
virtual bool NotifyPopupMessage(uint32_t &ptype, std::string &name, std::string &msg) = 0;
|
||||
|
||||
/* Control over Messages */
|
||||
virtual bool GetSysMessageList(std::map<uint32_t, std::string> &list) = 0;
|
||||
virtual bool GetPopupMessageList(std::map<uint32_t, std::string> &list) = 0;
|
||||
|
||||
virtual bool SetSysMessageMode(uint32_t sysid, uint32_t mode) = 0;
|
||||
virtual bool SetPopupMessageMode(uint32_t ptype, uint32_t mode) = 0;
|
||||
|
||||
/* Input from libretroshare */
|
||||
virtual bool AddPopupMessage(uint32_t ptype, std::string name, std::string msg) = 0;
|
||||
virtual bool AddSysMessage(uint32_t sysid, uint32_t type,
|
||||
std::string title, std::string msg) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue