-/*
- SILC Protocol Object.
-
- Short description of the field following:
-
- SilcProtocolType type
-
- Protocol type. This is enumeration.
-
- SilcProtocolCallback callback;
-
- Callback function for the protocol. This is SilcTaskCallback function
- pointer as the protocols in SILC are executed as timeout tasks.
-
- The object expands to another structure as well. Short description of
- these fields following:
-
- SilcProtocolObject *protocol
-
- This is the pointer to the protocol object defined above.
-
- SilcProtocolState state
-
- Protocol state. This is enumeration. The state of the protocol can
- be changed in the callback function.
-
- void *context
-
- Context to be sent for the callback function. This is usually
- object for either SILC client or server. However, this abstraction
- makes it possible that this pointer could be some other object as well.
-
- SilcProtocolExecute execute;
-
- Executes the protocol and its states. The correct state must be set
- before calling this function. The state is usually set in the protocol
- specific routines.
-
- SilcProtocolExecute execute_final;
-
- Executes the final callback function of the protocol. Read on.
-
- SilcProtocolFinalCallback final_callback;
-
- This is a callback function that is called with timeout _after_ the
- protocol has finished or error occurs. If this is NULL, naturally
- nothing will be executed. Protocol should call this function only at
- SILC_PROTOCOL_STATE_END and SILC_PROTOCOL_STATE_ERROR states.
-
-*/
+/****f* silccore/SilcProtocolAPI/SilcProtocolCallback
+ *
+ * SYNOPSIS
+ *
+ * typedef SilcTaskCallback SilcProtocolCallback;
+ *
+ * DESCRIPTION
+ *
+ * Protocol callback. This callback is set when registering new
+ * protocol. The callback is called everytime the protocol is executed.
+ * The `context' delivered to this callback function is the SilcProtocol
+ * context and needs to be explicitly type casted to SilcProtocol in
+ * the callback function.
+ *
+ ***/