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:
@@ -24,12 +24,33 @@
|
|||||||
// Description: An extended app_info.
|
// Description: An extended app_info.
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "RosterAppInfo.h"
|
#include "RosterAppInfo.h"
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
RosterAppInfo::RosterAppInfo()
|
RosterAppInfo::RosterAppInfo()
|
||||||
: app_info(),
|
: 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,
|
APP_STATE_REGISTERED,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct RosterAppInfo : app_info {
|
struct RosterAppInfo : app_info {
|
||||||
application_state state;
|
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();
|
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
|
#endif // ROSTER_APP_INFO_H
|
||||||
|
|||||||
Reference in New Issue
Block a user