mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
started conversion of VOIP code (from Joss) into a plugin. Unfinished!
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4945 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8f0f6a9f3e
commit
fc15899f0f
23 changed files with 10288 additions and 0 deletions
76
plugins/VOIP/p3Voip.h
Normal file
76
plugins/VOIP/p3Voip.h
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* Services for RetroShare.
|
||||
*
|
||||
* Copyright 2011-2012 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 "retroshare@lunamutt.com".
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "serialiser/rsmsgitems.h"
|
||||
#include "services/p3service.h"
|
||||
#include "retroshare/rsmsgs.h"
|
||||
|
||||
//!The basic VOIP service.
|
||||
|
||||
class p3VoipService: public RsPQIService, public RsVoip
|
||||
{
|
||||
public:
|
||||
p3VoipService() : RsPQIService(RS_SERVICE_TYPE_VOIP) {}
|
||||
|
||||
/***** overloaded from p3Service *****/
|
||||
/*!
|
||||
* This retrieves all chat msg items and also (important!)
|
||||
* processes chat-status items that are in service item queue. chat msg item requests are also processed and not returned
|
||||
* (important! also) notifications sent to notify base on receipt avatar, immediate status and custom status
|
||||
* : notifyCustomState, notifyChatStatus, notifyPeerHasNewAvatar
|
||||
* @see NotifyBase
|
||||
*/
|
||||
virtual int tick();
|
||||
virtual int status();
|
||||
|
||||
/*************** pqiMonitor callback ***********************/
|
||||
virtual void statusChange(const std::list<pqipeer> &plist);
|
||||
|
||||
/*!
|
||||
* public chat sent to all peers
|
||||
*/
|
||||
int sendVoipData(const void *data,uint32_t size);
|
||||
|
||||
protected:
|
||||
/************* from p3Config *******************/
|
||||
virtual RsSerialiser *setupSerialiser() ;
|
||||
|
||||
/*!
|
||||
* chat msg items and custom status are saved
|
||||
*/
|
||||
virtual bool saveList(bool& cleanup, std::list<RsItem*>&) ;
|
||||
virtual bool loadList(std::list<RsItem*>& load) ;
|
||||
|
||||
private:
|
||||
//RsMutex mChatMtx;
|
||||
|
||||
void receiveVoipQueue();
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue