Added token and registration_time fields and Init() method.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@464 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c39e453222
commit
3a5e755532
@ -24,12 +24,33 @@
|
||||
// Description: An extended app_info.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "RosterAppInfo.h"
|
||||
|
||||
// constructor
|
||||
RosterAppInfo::RosterAppInfo()
|
||||
: app_info(),
|
||||
state(APP_STATE_INVALID)
|
||||
state(APP_STATE_INVALID),
|
||||
token(0),
|
||||
registration_time(0)
|
||||
{
|
||||
}
|
||||
|
||||
// Init
|
||||
void
|
||||
RosterAppInfo::Init(thread_id thread, team_id team, port_id port, uint32 flags,
|
||||
const entry_ref *ref, const char *signature)
|
||||
{
|
||||
this->thread = thread;
|
||||
this->team = team;
|
||||
this->port = port;
|
||||
this->flags = flags;
|
||||
this->ref = *ref;
|
||||
if (signature) {
|
||||
strncpy(this->signature, signature, B_MIME_TYPE_LENGTH - 1);
|
||||
this->signature[B_MIME_TYPE_LENGTH - 1] = '\0';
|
||||
} else
|
||||
this->signature[0] = '\0';
|
||||
}
|
||||
|
||||
|
@ -35,10 +35,17 @@ enum application_state {
|
||||
APP_STATE_REGISTERED,
|
||||
};
|
||||
|
||||
|
||||
struct RosterAppInfo : app_info {
|
||||
application_state state;
|
||||
uint32 token;
|
||||
// token is meaningful only if state is APP_STATE_PRE_REGISTERED and
|
||||
// team is -1.
|
||||
bigtime_t registration_time; // time of first addition
|
||||
|
||||
RosterAppInfo();
|
||||
void Init(thread_id thread, team_id team, port_id port, uint32 flags,
|
||||
const entry_ref *ref, const char *signature);
|
||||
};
|
||||
|
||||
#endif // ROSTER_APP_INFO_H
|
||||
|
Loading…
Reference in New Issue
Block a user