get_first_payload_type for message_t

This commit is contained in:
Tobias Brunner 2007-10-02 11:42:27 +00:00
parent 6e19327473
commit 1fbcbe32d0
2 changed files with 21 additions and 2 deletions

View File

@ -6,7 +6,8 @@
*/
/*
* Copyright (C) 2006 Tobias Brunner, Daniel Roethlisberger
* Copyright (C) 2006-2007 Tobias Brunner
* Copyright (C) 2006 Daniel Roethlisberger
* Copyright (C) 2005-2006 Martin Willi
* Copyright (C) 2005 Jan Hutter
* Hochschule fuer Technik Rapperswil
@ -445,6 +446,14 @@ static exchange_type_t get_exchange_type (private_message_t *this)
return this->exchange_type;
}
/**
* Implementation of message_t.get_first_payload_type.
*/
static payload_type_t get_first_payload_type (private_message_t *this)
{
return this->first_payload;
}
/**
* Implementation of message_t.set_request.
*/
@ -1255,6 +1264,7 @@ message_t *message_create_from_packet(packet_t *packet)
this->public.get_ike_sa_id = (ike_sa_id_t*(*)(message_t*))get_ike_sa_id;
this->public.set_exchange_type = (void(*)(message_t*, exchange_type_t))set_exchange_type;
this->public.get_exchange_type = (exchange_type_t(*)(message_t*))get_exchange_type;
this->public.get_first_payload_type = (payload_type_t(*)(message_t*))get_first_payload_type;
this->public.set_request = (void(*)(message_t*, bool))set_request;
this->public.get_request = (bool(*)(message_t*))get_request;
this->public.add_payload = (void(*)(message_t*,payload_t*))add_payload;

View File

@ -6,7 +6,8 @@
*/
/*
* Copyright (C) 2006 Tobias Brunner, Daniel Roethlisberger
* Copyright (C) 2006-2007 Tobias Brunner
* Copyright (C) 2006 Daniel Roethlisberger
* Copyright (C) 2005-2006 Martin Willi
* Copyright (C) 2005 Jan Hutter
* Hochschule fuer Technik Rapperswil
@ -152,6 +153,14 @@ struct message_t {
* @return exchange type of the message
*/
exchange_type_t (*get_exchange_type) (message_t *this);
/**
* @brief Gets the payload type of the first payload.
*
* @param this message_t object
* @return payload type of the first payload
*/
payload_type_t (*get_first_payload_type) (message_t *this);
/**
* @brief Sets the request flag.