BOSS API
This is a discussion thread for all interested parties to hack out what they need and want. The idea behind BAPI is that the BOSS team (or rather, I) supply the code needed to parse the BOSS files or perform some BOSS-related functionality in a DLL which other utility makers than then load and call functions from as they require, rather than having to write out their own parsers, etc.
This will make keeping up-to-date with BOSS functionality easier, and will ensure that whatever the range of utilities available that reference BOSS information or functionality, they all have access to the same level and form of information.
I have created an issue for this on the Google Code page too: http://code.google.com/p/better-oblivion-sorting-software/issues/detail?id=111. The Google Code comment system is a bit rubbish though, so it's probably best to keep discussion here for now.
I can provide some information up-front already regarding the output encoding: BAPI output will be encoded in UTF-8. If you want to use it in another encoding, you're going to have to convert from that.
So far, Lojack has given me the following request:
// BOSS API// NOTES:// - This is just what I could tell that Wrye Bash needs to use for it's information.// I'm sure more things may be useful to expose (the actual ordering stuff, etc).// - Need to think about unicode. Best solution might be the 'Windows API way', with// for example a 'ParseMasterlistA' and 'ParseMasterlistW' function both exported.// I'm thinking encoding for the unicode versions would be UTF-8? Or would UTF-16// be better? Encoding on the 'tags' variables can always be ASCII, the variables// I see that would probably need to be unicode are:// ParseMasterlist - masterlistPath// ParseUserlist - userlistPath// GetBashTags - modName// GetBashRemoveTags - modName// GetDirtyMessage - message/* Initializing functions. Parse the userlist and masterlist for data */bool ParseMasterlist(const char *masterlistPath=NULL);// masterlistPath: path to the masterlist. If NULL, try the cwd.// return true if parsing successful, false otherwise. Possibly use// more return codes to pass error information?// A second call to this would reparse the masterlist, updating with// new information. An error on a reparse would not clear out old// masterlist information.bool ParseUserlist(const char *userlistPath=NULL);// userlistPath: path to userlist. If NULL, try the cwd.// return true if parsing successful, false otherwise. Possibly use// more return codes to pass error information?// A second call to this would reparse the userlist, updating with// new information. An error on a reparse will clear out old// userlist information./* Get information for a specific mod */int GetBashTags(const char *modName, char **tags, unsigned int maxTags, unsigned int bufferSize);// modName: name of the modfile to get information for (not case sensitive)// tags: list of strings, allocated by the caller to hold resulting tags.// maxTags: max number of strings that 'tags' can hold.// bufferSize: max length (including NULL) of each string in 'tags'.// return: <0: indicates an error, otherwise, indicates the actual number of tags filled into 'tags'//// There might be a better way to pass this information around?int GetBashRemoveTags(const char *modName, char **tags, unsigned int maxTags, unsigned int bufferSize);// modName: name of the modfile to get information for (not case sensitive)// tags: list of strings, allocated by the caller to hold resulting tags.// maxTags: max number of strings that 'tags' can hold.// bufferSize: max length (including NULL) of each string in 'tags'.// return: <0: indicates an error, otherwise, indicates the actual number of tags filled into 'tags'bool GetDirtyMessage(long crc, char *message, unsigned int bufferSize);// crc: CRC of the mod to get the dirty message for// message: buffer to hold the message, caller allocated// bufferSize: max length of 'message'// return: true if there was a message for that crc, false if not.