RetroShare/libretroshare/src/pqi/p3notify.h
drbob 0a9382cea5 Moved p3notify to pqi directory to fix compile order.
This is a bit of a hack, and should be fixed later.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@379 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2008-03-06 12:07:54 +00:00

86 lines
2.1 KiB
C++

#ifndef RS_P3_NOTIFY_INTERFACE_H
#define RS_P3_NOTIFY_INTERFACE_H
/*
* libretroshare/src/rsserver: p3notify.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 "rsiface/rsnotify.h"
#include "util/rsthreads.h"
class p3NotifySysMsg
{
public:
uint32_t sysid;
uint32_t type;
std::string title;
std::string msg;
};
class p3NotifyPopupMsg
{
public:
uint32_t type;
std::string name;
std::string msg;
};
class p3Notify: public RsNotify
{
public:
p3Notify() { return; }
virtual ~p3Notify() { return; }
/* Output for retroshare-gui */
virtual bool NotifySysMessage(uint32_t &sysid, uint32_t &type,
std::string &title, std::string &msg);
virtual bool NotifyPopupMessage(uint32_t &ptype, std::string &name, std::string &msg);
/* Control over Messages */
virtual bool GetSysMessageList(std::map<uint32_t, std::string> &list);
virtual bool GetPopupMessageList(std::map<uint32_t, std::string> &list);
virtual bool SetSysMessageMode(uint32_t sysid, uint32_t mode);
virtual bool SetPopupMessageMode(uint32_t ptype, uint32_t mode);
/* Input from libretroshare */
virtual bool AddPopupMessage(uint32_t ptype, std::string name, std::string msg);
virtual bool AddSysMessage(uint32_t sysid, uint32_t type,
std::string title, std::string msg);
private:
RsMutex noteMtx;
std::list<p3NotifySysMsg> pendingSysMsgs;
std::list<p3NotifyPopupMsg> pendingPopupMsgs;
};
#endif