WORD PTR

Pointed Development

wordptr.libwpd – Expanding Configuration, Changing the Interface

| Comments

Here I go, changing the interface. Again.

I continue to refactor wordptr.libpwd.

The following methods have been added to or changed in the wp_configuration_t interface:

  • Name Changed: get_daemon_on_start_method
  • Name Changed: set_daemon_on_start_method
  • Signature Changed: populate_from_file
  • Added: set_config_file_path
  • Added: set_lock_file_path
1
2
3
4
5
6
7
8
typedef struct wp_configuration {
  wp_status_t (*populate_from_file)(struct wp_configuration *self, const char *file_path);
  void (*set_config_file_path)(const struct wp_configuration *self, const char *value);
  void (*set_lock_file_path)(const struct wp_configuration *self, const char *value);
  wp_daemon_on_start_method_fn (*get_daemon_on_start_method)(const struct wp_configuration *self);
  void (*set_daemon_on_start_method)(const struct wp_configuration *self, wp_daemon_on_start_method_fn fn);
  /* additional methods left out */
} wp_configuration_t, *wp_configuration_pt;

I made a decision to (re)name all events following an “on” semantic, such as “on_event.” For example, see the method name change for “get_daemon_on_start_method.”

Additionally, I’m still cleaning up the cruft left over from converting the project from the original stand-alone Linux daemon tutorial. There’s a lot of worthless code in the library at the moment, but it’s being stripped out.

Finally, I’m beginning to add documentation.

Have fun.

Comments