157 if printElemNumber: elm="(%d)" % cnt |
157 if printElemNumber: elm="(%d)" % cnt |
158 res+=prefix+("call%s: %s\n" % (elm, self.DebugFormatString(e))) |
158 res+=prefix+("call%s: %s\n" % (elm, self.DebugFormatString(e))) |
159 cnt+=1 |
159 cnt+=1 |
160 return res |
160 return res |
161 |
161 |
|
162 |
|
163 def _BuildTagLookupTable(sparse, maxtag, default=None): |
|
164 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)]) |
|
165 |
162 kpackage = 1 |
166 kpackage = 1 |
163 kcapability = 2 |
167 kcapability = 2 |
164 kcall = 3 |
168 kcall = 3 |
165 |
169 |
166 _TEXT = ( |
170 _TEXT = _BuildTagLookupTable({ |
167 "ErrorCode", |
171 0: "ErrorCode", |
168 "package", |
172 1: "package", |
169 "capability", |
173 2: "capability", |
170 "call", |
174 3: "call", |
171 ) |
175 }, 3) |
172 |
176 |
173 _TYPES = ( |
177 _TYPES = _BuildTagLookupTable({ |
174 ProtocolBuffer.Encoder.NUMERIC, |
178 0: ProtocolBuffer.Encoder.NUMERIC, |
175 ProtocolBuffer.Encoder.STRING, |
179 1: ProtocolBuffer.Encoder.STRING, |
176 |
180 2: ProtocolBuffer.Encoder.STRING, |
177 ProtocolBuffer.Encoder.STRING, |
181 3: ProtocolBuffer.Encoder.STRING, |
178 |
182 }, 3, ProtocolBuffer.Encoder.MAX_TYPE) |
179 ProtocolBuffer.Encoder.STRING, |
|
180 |
|
181 ) |
|
182 |
183 |
183 _STYLE = """""" |
184 _STYLE = """""" |
184 _STYLE_CONTENT_TYPE = """""" |
185 _STYLE_CONTENT_TYPE = """""" |
185 class IsEnabledResponse(ProtocolBuffer.ProtocolMessage): |
186 class IsEnabledResponse(ProtocolBuffer.ProtocolMessage): |
186 |
187 |
335 res+=e.__str__(prefix + " ", printElemNumber) |
336 res+=e.__str__(prefix + " ", printElemNumber) |
336 res+=prefix+">\n" |
337 res+=prefix+">\n" |
337 cnt+=1 |
338 cnt+=1 |
338 return res |
339 return res |
339 |
340 |
|
341 |
|
342 def _BuildTagLookupTable(sparse, maxtag, default=None): |
|
343 return tuple([sparse.get(i, default) for i in xrange(0, 1+maxtag)]) |
|
344 |
340 ksummary_status = 1 |
345 ksummary_status = 1 |
341 ktime_until_scheduled = 2 |
346 ktime_until_scheduled = 2 |
342 kconfig = 3 |
347 kconfig = 3 |
343 |
348 |
344 _TEXT = ( |
349 _TEXT = _BuildTagLookupTable({ |
345 "ErrorCode", |
350 0: "ErrorCode", |
346 "summary_status", |
351 1: "summary_status", |
347 "time_until_scheduled", |
352 2: "time_until_scheduled", |
348 "config", |
353 3: "config", |
349 ) |
354 }, 3) |
350 |
355 |
351 _TYPES = ( |
356 _TYPES = _BuildTagLookupTable({ |
352 ProtocolBuffer.Encoder.NUMERIC, |
357 0: ProtocolBuffer.Encoder.NUMERIC, |
353 ProtocolBuffer.Encoder.NUMERIC, |
358 1: ProtocolBuffer.Encoder.NUMERIC, |
354 |
359 2: ProtocolBuffer.Encoder.NUMERIC, |
355 ProtocolBuffer.Encoder.NUMERIC, |
360 3: ProtocolBuffer.Encoder.STRING, |
356 |
361 }, 3, ProtocolBuffer.Encoder.MAX_TYPE) |
357 ProtocolBuffer.Encoder.STRING, |
|
358 |
|
359 ) |
|
360 |
362 |
361 _STYLE = """""" |
363 _STYLE = """""" |
362 _STYLE_CONTENT_TYPE = """""" |
364 _STYLE_CONTENT_TYPE = """""" |
363 |
365 |
364 __all__ = ['IsEnabledRequest','IsEnabledResponse'] |
366 __all__ = ['IsEnabledRequest','IsEnabledResponse'] |