"RELAYED"
);
+/**
+ * Forward declaration
+ */
+static private_endpoint_notify_t *endpoint_notify_create();
+
/**
* Helper functions to parse integer values
*/
{
private_endpoint_notify_t *clone;
- clone = (private_endpoint_notify_t*)endpoint_notify_create();
+ clone = endpoint_notify_create();
clone->priority = this->priority;
clone->type = this->type;
clone->family = this->family;
free(this);
}
-/*
- * Described in header
+/**
+ * Creates an empty endpoint notify
*/
-endpoint_notify_t *endpoint_notify_create()
+static private_endpoint_notify_t *endpoint_notify_create()
{
private_endpoint_notify_t *this;
.type = NO_TYPE,
);
- return &this->public;
+ return this;
}
/**
* Described in header
*/
-endpoint_notify_t *endpoint_notify_create_from_host(me_endpoint_type_t type, host_t *host, host_t *base)
+endpoint_notify_t *endpoint_notify_create_from_host(me_endpoint_type_t type,
+ host_t *host, host_t *base)
{
- private_endpoint_notify_t *this;
-
- this = (private_endpoint_notify_t*)endpoint_notify_create();
+ private_endpoint_notify_t *this = endpoint_notify_create();
this->type = type;
switch(type)
return NULL;
}
- this = (private_endpoint_notify_t*)endpoint_notify_create();
+ this = endpoint_notify_create();
data = notify->get_notification_data(notify);
if (parse_notification_data(this, data) != SUCCESS)
/**
* Generates a notification payload from this endpoint.
*
- * @return built notify_payload_t
+ * @return built notify_payload_t
*/
notify_payload_t *(*build_notify) (endpoint_notify_t *this);
void (*destroy) (endpoint_notify_t *this);
};
-/**
- * Creates an empty endpoint_notify_t object.
- *
- * @return created endpoint_notify_t object
- */
-endpoint_notify_t *endpoint_notify_create(void);
-
-
/**
* Creates an endpoint_notify_t object from a host.
*
* @param type the endpoint type
* @param host host to base the notify on (gets cloned)
- * @param base base of the endpoint, applies only to reflexive endpoints (gets cloned)
+ * @param base base of the endpoint, applies only to reflexive
+ * endpoints (gets cloned)
* @return created endpoint_notify_t object
*/
endpoint_notify_t *endpoint_notify_create_from_host(me_endpoint_type_t type,
*
* @param notify the notify payload
* @return - created endpoint_notify_t object
- * - NULL if invalid payload
+ * - NULL if invalid payload
*/
endpoint_notify_t *endpoint_notify_create_from_payload(notify_payload_t *notify);