Changeset 5c5fe6d for server/lib/gutenbach/ipp/attribute.py
- Timestamp:
- Dec 17, 2011, 5:52:59 PM (12 years ago)
- Branches:
- no-cups
- Children:
- 287d6ec
- Parents:
- 5d24a81
- git-author:
- Jessica B. Hamrick <jhamrick@…> (12/17/11 17:52:59)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (12/17/11 17:52:59)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/gutenbach/ipp/attribute.py
rdf51061 r5c5fe6d 8 8 9 9 class Attribute(object): 10 """ 11 In addition to what the RFC reports, an attribute has an 12 'attribute tag', which specifies what type of attribute it is. 13 It is 1 bytes long, and comes before the list of values. 10 """In addition to what the RFC reports, an attribute has an 11 'attribute tag', which specifies what type of attribute it is. It 12 is 1 bytes long, and comes before the list of values. 14 13 15 14 From RFC 2565: … … 38 37 | value | w bytes | 39 38 ----------------------------------------------------------- 39 40 40 """ 41 41 42 42 def __init__(self, name=None, values=None): 43 """ 44 Initialize an Attribute. This function can be called in three 45 different ways: 43 """Initialize an Attribute. This function can be called in 44 three different ways: 46 45 47 46 Attribute() -- creates an empty Attribute … … 57 56 58 57 values -- a list of Values. May not be empty. 58 59 59 """ 60 60 … … 73 73 @property 74 74 def packed_value(self): 75 """ 76 Packs the attribute data into binary data.75 """Packs the attribute data into binary data. 76 77 77 """ 78 78 … … 132 132 @property 133 133 def packed_value_size(self): 134 """Gets the total size of the attribute. 135 134 136 """ 135 Gets the total size of the attribute. 136 """ 137 137 138 return len(self.packed_value) 138 139
Note: See TracChangeset
for help on using the changeset viewer.