src/transport_internal.h
branchnew-transport
changeset 159 d3e253d7281a
parent 157 1e5674d0eec4
child 165 b3e95108c884
equal deleted inserted replaced
158:b5a5df4f4421 159:d3e253d7281a
    51 
    51 
    52 /**
    52 /**
    53  * The definition of a transport type
    53  * The definition of a transport type
    54  */
    54  */
    55 struct transport_type {
    55 struct transport_type {
       
    56     /** Parent type */
       
    57     const struct transport_type *parent;
       
    58 
    56     /** Method table */
    59     /** Method table */
    57     struct transport_methods methods;
    60     struct transport_methods methods;
    58 };
    61 };
    59 
    62 
    60 /**
    63 /**
    81  */
    84  */
    82 void transport_init (transport_t *transport, const struct transport_type *type, const struct transport_info *info);
    85 void transport_init (transport_t *transport, const struct transport_type *type, const struct transport_info *info);
    83 
    86 
    84 /**
    87 /**
    85  * Check the type of the transport, and return the transport as a void* suitable for casting to the appropriate struct
    88  * Check the type of the transport, and return the transport as a void* suitable for casting to the appropriate struct
    86  * for the type.
    89  * for the type, or any of its children.
    87  *
    90  *
    88  * It is a bug to call this with a transport of a different type.
    91  * It is a bug to call this with a transport of a different type.
    89  */
    92  */
    90 void* transport_check (transport_t *transport, const struct transport_type *type);
    93 void* transport_check (transport_t *transport, const struct transport_type *type);
    91 
    94