mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-25 01:01:40 -04:00
finished status service
- can be called use rs interface rstatus - does not save last rs session status yet git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2715 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
2eb3d560e0
commit
300952d2a6
11 changed files with 560 additions and 19 deletions
|
@ -6,7 +6,7 @@
|
|||
*
|
||||
* RetroShare C++ .
|
||||
*
|
||||
* Copyright 2007-2008 by Vinny Do.
|
||||
* Copyright 2007-2008 by Vinny Do, Chris Evi-Parker.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
|
@ -33,29 +33,32 @@ extern RsStatus *rsStatus;
|
|||
#include <iostream>
|
||||
#include <string>
|
||||
#include <inttypes.h>
|
||||
#include <list>
|
||||
|
||||
const uint32_t RS_STATUS_OFFLINE = 0x0001;
|
||||
const uint32_t RS_STATUS_AWAY = 0x0002;
|
||||
const uint32_t RS_STATUS_BUSY = 0x0003;
|
||||
const uint32_t RS_STATUS_ONLINE = 0x0004;
|
||||
|
||||
std::string RsStatusString(uint32_t status);
|
||||
|
||||
class StatusInfo
|
||||
{
|
||||
public:
|
||||
std::string id;
|
||||
uint32_t status;
|
||||
time_t time_stamp; /// for owner time set, and for their peers time sent
|
||||
};
|
||||
|
||||
class RsStatus
|
||||
{
|
||||
public:
|
||||
virtual bool getStatus(std::string id, StatusInfo& statusInfo) = 0;
|
||||
virtual bool setStatus(StatusInfo& statusInfo) = 0;
|
||||
virtual bool getStatus(std::list<StatusInfo>& statusInfo) = 0;
|
||||
virtual bool sendStatus(StatusInfo& statusInfo) = 0;
|
||||
virtual bool statusAvailable() = 0;
|
||||
|
||||
virtual void getStatusString(uint32_t status, std::string& statusString) = 0;
|
||||
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, const StatusInfo& statusInfo);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue