Skip to content

Commit 5f02fc7

Browse files
committed
Document the ChannelBindings class
This commit documents the ChannelBindings class. Part of #9
1 parent 0b1f1c7 commit 5f02fc7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

gssapi/raw/chan_bindings.pyx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ from libc.stdlib cimport calloc, free
33
from gssapi.raw.cython_types cimport *
44

55
cdef class ChannelBindings:
6+
"""GSSAPI Channel Bindings
7+
8+
This class represents a set of GSSAPI channel bindings.
9+
"""
10+
611
# defined in pxd file
712
# cdef public object initiator_address_type
813
# cdef public bytes initiator_address
@@ -15,6 +20,15 @@ cdef class ChannelBindings:
1520
def __init__(ChannelBindings self, initiator_address_type=None,
1621
initiator_address=None, acceptor_address_type=None,
1722
acceptor_address=None, application_data=None):
23+
"""
24+
Args:
25+
initiator_address_type (AddressType): the initiator address type
26+
initiator_address (bytes): the initiator address
27+
acceptor_address_type (AddressType): the acceptor address type
28+
acceptor_address (bytes): the acceptor address
29+
application_data (bytes): additional application-specific data
30+
"""
31+
1832
self.initiator_address_type = initiator_address_type
1933
self.initiator_address = initiator_address
2034

@@ -24,6 +38,7 @@ cdef class ChannelBindings:
2438
self.application_data = application_data
2539

2640
cdef gss_channel_bindings_t __cvalue__(ChannelBindings self) except NULL:
41+
"""Get the C struct version of the channel bindings"""
2742
cdef gss_channel_bindings_t res
2843
res = <gss_channel_bindings_t>calloc(1, sizeof(res[0]))
2944

0 commit comments

Comments
 (0)