Changes between Initial Version and Version 1 of Registry2Notes


Ignore:
Timestamp:
Mar 15, 2009, 12:33:18 AM (16 years ago)
Author:
blb@…
Comment:

Some notes about the registry2.0 code

Legend:

Unmodified
Added
Removed
Modified
  • Registry2Notes

    v1 v1  
     1= Introduction =
     2Note that some source files have doxygen-style comments, so some docs can be created by running doxygen on them.
     3
     4== Tcl commands created == #tcl_commands
     5 - `registry::entry cmd ?arg ...?`
     6  - Run a command against registry entries
     7 - `${entry} cmd ?arg ...?`
     8  - Commands specific to just one registry entry (usually gained from `registry::entry`)
     9 - `item cmd ?arg ...?`
     10 - `${item} cmd ?arg ...?`
     11 - `registry::open`
     12 - `registry::close`
     13 - `registry::read`
     14 - `registry::write`
     15
     16== C code files == #c_code
     17=== entry.[ch] === #entry_c
     18 - void delete_entry(ClientData clientData)
     19  - to be used as the 'Tcl_CmdDeleteProc' for an entry object
     20 - int entry_cmd(ClientData clientData UNUSED, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
     21  - implements "registry::entry cmd ?arg ...?"
     22  - commands are:
     23   - create - entry_create()
     24   - delete - entry_delete()
     25   - open - entry_open()
     26   - close - entry_close()
     27   - search - entry_search()
     28   - exists - entry_exists()
     29   - imaged - entry_imaged()
     30   - intalled - entry_installed()
     31   - owner - entry_owner()
     32
     33=== entryobj.[ch] === #entryobj_c
     34 - int entry_obj_cmd(ClientData clientData, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
     35  - implements "${entry} cmd ?arg ...?" (procs for entry objects from "registry::entry")
     36  - commands are:
     37   - name - entry_obj_prop()
     38   -  portfile - entry_obj_prop()
     39   -  url - entry_obj_prop()
     40   -  location - entry_obj_prop()
     41   -  epoch - entry_obj_prop()
     42   -  version - entry_obj_prop()
     43   -  revision - entry_obj_prop()
     44   -  variants - entry_obj_prop()
     45   -  default_variants - entry_obj_prop()
     46   -  date - entry_obj_prop()
     47   -  state - entry_obj_prop()
     48   -  installtype - entry_obj_prop()
     49   -  map - entry_obj_filemap()
     50   -  unmap - entry_obj_filemap()
     51   -  files - entry_obj_files()
     52   -  imagefiles - entry_obj_imagefiles()
     53   -  activate - entry_obj_activate()
     54   -  deactivate - entry_obj_filemap()
     55   -  dependents - entry_obj_dependents()
     56   -  dependencies - entry_obj_dependencies()
     57   -  depends - entry_obj_depends()
     58
     59=== graph.[ch] === #graph_c
     60=== graphobj.[ch] === #graphobj_c
     61 - Not completed, not built
     62
     63=== item.[ch] === #item_c
     64 - int item_cmd(ClientData clientData UNUSED, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
     65  - implements "item cmd ?arg ...?"
     66  - commands are:
     67   - create - item_create()
     68   -  search - item_search()
     69   -  exists - item_exists()
     70   -  others are commented-out (retain, release, name, url, path, worker, options, and variants)
     71
     72=== itemobj.[ch] === #itemobj_c
     73 - int item_obj_cmd(ClientData clientData, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
     74  - implements "${item} cmd ?arg ...?" (procs for item objects from "item"
     75  - commands are:
     76   - retain - item_obj_retain()
     77   - release - item_obj_release()
     78   - key - item_obj_key()
     79
     80=== registry.[ch] === #registry_c
     81 - reg_registry* registry_for(Tcl_Interp* interp, int status)
     82  - Get the appropriate registry for the given Tcl interpreter
     83 - int registry_failed(Tcl_Interp* interp, reg_error* errPtr)
     84  - Sets a Tcl object result based on errPtr
     85 - int Registry_Init(Tcl_Interp* interp)
     86  - The Tcl entry point for registry2.0; creates several commands:
     87   - registry::open - registry_open()
     88   - registry::close - registry_close()
     89   - registry::read - registry_read()
     90   - registry::write - registry_write()
     91   - registry::entry - entry_cmd()
     92
     93=== util.[ch] === #util_c
     94 - char* unique_name(Tcl_Interp* interp, char* prefix)
     95  - Generate a unique proc name starting with the given prefix (eg, ''<prefix>123'', ''<prefix>124'', etc)
     96 - int parse_flags(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[], int* start, option_spec options[], int* flags)
     97  - Handle flags ('''-flag''') in Tcl command strings
     98 - void* get_object(Tcl_Interp* interp, char* name, char* type, Tcl_ObjCmdProc* proc, reg_error* errPtr)
     99  - Retrieves the object whose proc is named by the given name
     100 - int set_object(Tcl_Interp* interp, char* name, void* value, char* type, Tcl_ObjCmdProc* proc, Tcl_CmdDeleteProc* deleteProc, reg_error* errPtr)
     101  - Sets the object whose proc is named by the given name
     102 - int set_entry(Tcl_Interp* interp, char* name, reg_entry* entry, reg_error* errPtr)
     103  - Sets a given name to be an entry object
     104 - void set_sqlite_result(Tcl_Interp* interp, sqlite3* db, const char* query)
     105  - Reports a sqlite3 error to Tcl
     106 - int all_objects(Tcl_Interp* interp, sqlite3* db, char* query, char* prefix, set_object_function* setter)
     107  - Sets the result of the Tcl interpreter to all objects returned by a query
     108 - const char* string_or_null(Tcl_Obj* obj)
     109  - Return the `char *` for a Tcl object, or if it is a string with only NULL, return NULL
     110 - int recast(void* userdata, cast_function* fn, free_function* del, void*** outv, void** inv, int inc, reg_error* errPtr)
     111  -
     112 - int entry_to_obj(Tcl_Interp* interp, Tcl_Obj** obj, reg_entry* entry, reg_error* errPtr)
     113  - Return Tcl string for a given entry object
     114 - int list_entry_to_obj(Tcl_Interp* interp, Tcl_Obj*** objs, reg_entry** entries, int entry_count, reg_error* errPtr)
     115  - Call entry_to_obj() for an array of entries
     116 - void free_strings(void* userdata UNUSED, char** strings, int count)
     117  - Defined in util.h but doesn't actually exist
     118 - int list_obj_to_string(char*** strings, Tcl_Obj** objv, int objc, reg_error* errPtr)
     119  - Convert an array of Tcl objects to `char *` array
     120 - int list_string_to_obj(Tcl_Obj*** objv, char** strings, int objc, reg_error* errPtr)
     121  - Convert an array of `char *` to Tcl object array
     122