- added a forward declaration of nsIInterfaceInfoManager to xptinfo.h
- reworked and cleaned up most aspects of the loader; typelib files now get associated typelib records, which have arrays of pointers to shared interface records; no hashtable lookup is necessary to resolve index pointers from params, etc to nsInterfaceInfo objects.
- moved to two hashtables in nsInterfaceInfoManager, mapping from name->interface record and iid->interface record. Still unclear if I handle the different-iid, same-name case correctly.
Removed awkward nsXPTParamInfo::GetInterface and friend, and als removed supporting nsXPTParamInfo.cpp file. Replace by nsIInterfaceInfo::GetInfoForParam and friend.
Made the constructor for nsInterfaceInfo private, with nsInterfaceInfoManager as a friend class.
* xpt_dump now checks num_methods and num_constants before trying to walk the arrays.
* xpt_link now actually links. It even updates interfaces indices. Tested using all the idl files in mozilla/xpcom/idl.
- Added magic comments to make the LXR browsing experience more pleasant.
- introduced the nsInterfaceRecord class (formerly less formally interface_record).
- changed the XPTInterfaceDirectoryEntry pointer in InterfaceInfoes into nsInterfaceRecord pointers, removing the need for a hash just to go from entries to records to support nsXPTParamInfo::GetInterface.
- made the destructor for InterfaceInfo objects remove null the pointer in the corresponding reference.
API change - changed nsXPTParamInfo from taking an InterfaceDirectoryEntry* (which really isn't part of the API I want to expose) to taking an nsIInterfaceInfo*, which is.
Progress on the nsInterfaceInfoManager typelib loader for xpconnect.
Now has complete (I think) functionality, though the implementation is
still probably rusty.
I punted on defining a directory for .xpt files at this point; the
implementation looks at the value of the XPTDIR environment variable
for this value.
Note that the nsXPTParaminfo interface (public/xpt_cpp) has changed
(possibly temporarily) to take an 'entry' parameter.
Moved nsInterfaceInfoManager files from the libxpt directory (where
they would have precipitated an unpleasant circular dependency between
xpidl and nsISupports.h) into a new subdirectory.
Added corresponding entries to allmakefiles.sh.
nsInterfaceInfoManager is intended to abstract the loading and
management of typelib information generated by xpidl, for use by
xpconnect.
* first pass at typelib linker
* parent_interface modification is untested
* interface offset management is unimplemented
* what to do about annotations?
* eliminated compiler warnings on Linux
* added extra error checking for file manipulation in SimpleTypeLib and xpt_dump
* removed erroneous comment from xpt_struct.h
* added function XPT_GetInterfaceIndexByName
* replaced remaining occurences of 'namespace' with 'name_space' to keep C++ happy
* added xpt_dump display for param types (in/out/retval)
* changed xpt_dump handling for wchar_t strings
* use shaver's print_IID function when displaying type descriptors
* removed DoAnnotations (not used)
Removed unused XPT_ALLOC macro.
Move XPT_SetDataOffset calls into XPT_DoHeader so that the API consumer doesn't
need to know about header sizing and IDE layout guck.
Handle NULL namespaces and interface_directory bits snd idents better.
Made xpt_dump show the the IID for interfaces.
Update to use 16-bit IDE indices (one-based) instead of header-pool offsets.
Removed debugging cruft.
Added prototypes to get rid of warnings.
Fix many dumb mistakes WRT allocation and index checking.
* added directory libxpt/tools which currently only contains the typelib dumper
* removed dump code from tests dir
* added/modified appropriate Makefiles and configure scripts
* fixed XPT_SizeOfHeader. It wasn't actually walking the annotations, but it does now.
* added some basic dumping code to SimpleTypeLib. Currently only the headers can be dumped. Once XDR read code is up and running, this dumping code will become a separate utility, most likely under a libxpt/tools subdir.
NewString and NewStringZ APIs.
No more bit-fields (nod to jband and fur, thanks).
Cleaned up Annotation structures.
On-disk offsets are 1-based.
Write annotations to disk, and account for them in header size, etc.
Fix sundry cursor-vs-&cursor bugs and don't-allocate-on-decode bugs.
Write MethodDescriptors and InterfaceDescriptors to disk!
Executive Summary: can now write very simple .xpt files!
Minor brace-placement tweaks.
Added SimpleTypeLib test program, although it doesn't build due to Makefile.in
suckage.
Fixed XPT_DoHeader to only write IDEs once (duh).
Added SizeOfHeaderBlock to API.
* removed struct size #defines -> they were just silly anyway.
* replaced references to IDE file offsetsi with uint32 indices.
* first attempt at sorting out order of storage for XPTHeader and XPTInterfaceDirectoryEntry
Mild macro renaming.
Debugging output from CHECK_COUNT.
Fixed primitives and PrimitiveTest: we now pass! (32, 16, 8 and CString)
Dynamically link PrimitiveTest.
* added looping to read/write InterfaceDirectoryEntrys
* InterfaceDescriptors are no longer DECODEd as part of the IDE DECODEing process
* added skeleton for XPT_GetDescriptorByOffset
* added #defines for is_pointer/tag combos used in TypeDescriptors to match table in typelib spec.
* now handle error case in xpt_struct.c using macro
* still must do offset management
* modified in-memory structs slightly to get them to compile
* xpt_strcut.c now compiles, and with no warnings (at no extra charge)
* still must do offset management