OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # | 2 # |
3 # Copyright (C) 2013 Google Inc. All rights reserved. | 3 # Copyright (C) 2013 Google Inc. All rights reserved. |
4 # | 4 # |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
7 # met: | 7 # met: |
8 # | 8 # |
9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 interface_info['unforgeable_attributes'][component] = unforgeable_at
tributes | 212 interface_info['unforgeable_attributes'][component] = unforgeable_at
tributes |
213 return interface_info | 213 return interface_info |
214 | 214 |
215 definitions = self.reader.read_idl_file(idl_filename) | 215 definitions = self.reader.read_idl_file(idl_filename) |
216 | 216 |
217 this_union_types = collect_union_types_from_definitions(definitions) | 217 this_union_types = collect_union_types_from_definitions(definitions) |
218 self.union_types.update(this_union_types) | 218 self.union_types.update(this_union_types) |
219 self.typedefs.update(definitions.typedefs) | 219 self.typedefs.update(definitions.typedefs) |
220 for callback_function_name, callback_function in definitions.callback_fu
nctions.iteritems(): | 220 for callback_function_name, callback_function in definitions.callback_fu
nctions.iteritems(): |
221 if 'ExperimentalCallbackFunction' in callback_function.extended_attr
ibutes: | 221 if 'ExperimentalCallbackFunction' in callback_function.extended_attr
ibutes: |
222 self.callback_functions[callback_function_name] = callback_funct
ion | 222 # Set 'component_dir' to specify a directory that callback funct
ion files belong to |
| 223 self.callback_functions[callback_function_name] = { |
| 224 'callback_function': callback_function, |
| 225 'component_dir': idl_filename_to_component(idl_filename), |
| 226 'full_path': os.path.realpath(idl_filename), |
| 227 } |
223 # Check enum duplication. | 228 # Check enum duplication. |
224 for enum_name in definitions.enumerations.keys(): | 229 for enum_name in definitions.enumerations.keys(): |
225 for defined_enum in self.enumerations: | 230 for defined_enum in self.enumerations: |
226 if defined_enum.name == enum_name: | 231 if defined_enum.name == enum_name: |
227 raise Exception('Enumeration %s has multiple definitions' %
enum_name) | 232 raise Exception('Enumeration %s has multiple definitions' %
enum_name) |
228 self.enumerations.update(definitions.enumerations.values()) | 233 self.enumerations.update(definitions.enumerations.values()) |
229 | 234 |
230 if definitions.interfaces: | 235 if definitions.interfaces: |
231 definition = next(definitions.interfaces.itervalues()) | 236 definition = next(definitions.interfaces.itervalues()) |
232 interface_info = { | 237 interface_info = { |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 | 360 |
356 write_pickle_file(options.interfaces_info_file, | 361 write_pickle_file(options.interfaces_info_file, |
357 info_collector.get_info_as_dict(), | 362 info_collector.get_info_as_dict(), |
358 options.write_file_only_if_changed) | 363 options.write_file_only_if_changed) |
359 write_pickle_file(options.component_info_file, | 364 write_pickle_file(options.component_info_file, |
360 info_collector.get_component_info_as_dict(), | 365 info_collector.get_component_info_as_dict(), |
361 options.write_file_only_if_changed) | 366 options.write_file_only_if_changed) |
362 | 367 |
363 if __name__ == '__main__': | 368 if __name__ == '__main__': |
364 sys.exit(main()) | 369 sys.exit(main()) |
OLD | NEW |