• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

CLI interface to medialist (fossil mirror)


Commit MetaInfo

Revision74585568b0ee7d76a88406ce67238ec3a39a9e1b (tree)
Zeit2023-04-04 15:40:02
Autormio <stigma@disr...>
Commitermio

Log Message

Finish updating medialist info document for version 0.4

FossilOrigin-Name: f3ae10816106fa4fc5833a092293ea7065f4a7bf7eb31dfd22356f800cca4d78

Ändern Zusammenfassung

Diff

--- a/docs/medialist.info
+++ b/docs/medialist.info
@@ -1,7 +1,7 @@
11 \input texinfo @c -*-texinfo-*-
22
33 @set VERSION 0.4
4-@set UPDATED 2022-03-16
4+@set UPDATED 2022-04-04
55
66 @settitle MediaList @value{VERSION}
77 @syncodeindex pg cp
@@ -39,7 +39,7 @@ information, visit @uref{http://creativecommons.org/publicdomain/zero/1.0/}.
3939 @contents
4040
4141 @node Top
42-@top MediaList
42+@top Top
4343
4444 This manual is for MediaList (version @value{VERSION}, @value{UPDATED}).
4545
@@ -84,6 +84,38 @@ Some programs (e.g. the
8484 @uref{https://yume-neru.neocities.org/p/medialist.html, medialist suite of programs})
8585 use these comments as a way of providing per-file configuration.
8686
87+@node Constants
88+@chapter Constants
89+
90+There are only a couple of constants present in MediaList.
91+
92+@table @code
93+@item enum string MediaListVersion
94+@pindex enum MediaListVersion
95+
96+This string represents the current version of MediaList, it may also
97+contains a ``-dev'' suffix to indicate that you're running a development
98+version which may have some known bugs. The format is Major.Minor.Patch.
99+
100+A ``Major'' version change represents the removal or modification of an
101+existing API. The ``Patch'' version is used only for compile-time fixes.
102+The ``Minor'' version represents all other changes.
103+
104+@item enum int[3] MediaListVersionA
105+@pindex enum MediaListVersionA
106+
107+This static array represents the version of MediaList you're compiling
108+against. Unlike the string version, this doesn't have a method for
109+determining a development version. The format is still Major.Minor.Patch.
110+
111+@end table
112+
113+@cartouche
114+@b{Note}: MediaList hasn't reached a ``1.0.0'' version yet, each new
115+release is only incrementing the ``Minor'' version. These ``pre-Major''
116+versions can still contain modifications to (or the removal of) APIs.
117+@end cartouche
118+
87119 @node Data Types
88120 @chapter Data Types
89121
@@ -391,38 +423,52 @@ code.
391423
392424 @table @code
393425 @item MediaList* ml_open_list(string filePath)
426+@item MediaList* ml_open_list(string filePath, out MLError error) nothrow
394427 @pindex ml_open_list
395428
396429 This function will allocate the memory for a @code{MediaList} structure,
397430 returning @code{null} if the allocation fails.
398431
399-@item void ml_free_list(MediaList* list)
432+If the underlying file for the list doesn't exist (i.e. a new list is being
433+created), then the file will be created with the default headers.
434+
435+The nothrow version will return provide a @code{MLError} in the event of
436+an error when creating the new file, otherwise it will be equal to
437+@code{MLError.success}.
438+
439+@item void ml_free_list(MediaList* list) nothrow
400440 @pindex ml_free_list
401441
402-This function will free the allocated memory for a @code{MediaList} structure.
442+This function will free the allocated memory for a @code{MediaList}
443+structure created by @code{ml_open_list}.
403444
404-@item MediaListHeader[] ml_fetch_headers(MediaList* list, MLError* error = null)
445+@item MediaListHeader[] ml_fetch_headers(MediaList* list)
446+@item MediaListHeader[] ml_fetch_headers(MediaList* list, out MLError error) nothrow
405447 @pindex ml_fetch_headers
406448
407449 This function will fetch all of the headers from the list's mTSV file. An
408450 optional @code{error} parameter is provided for error handling.
409451
410-@item MediaListItem ml_fetch_item(MediaList* list, size_t id, MLError* error = null)
452+@item MediaListItem ml_fetch_item(MediaList* list, size_t id)
453+@item MediaListItem ml_fetch_item(MediaList* list, size_t id, out MLError error) nothrow
411454 @pindex ml_fetch_item
412455
413456 Fetch a single item from the list.
414457
415-@item MediaListItem[] ml_fetch_items(MediaList* list, MLError* error, size_t[] ids...)
458+@item MediaListItem[] ml_fetch_items(MediaList* list, size_t[] ids...)
459+@item MediaListItem[] ml_fetch_items(MediaList* list, out MLError err, size_t[] ids ...) nothrow
416460 @pindex ml_fetch_items
417461
418462 Fetch multiple items from a list.
419463
420-@item MediaListItem[] ml_fetch_all(MediaList* list, MLError* error = null)
464+@item MediaListItem[] ml_fetch_all(MediaList* list)
465+@item MediaListItem[] ml_fetch_all(MediaList* list, out MLError error) nothrow
421466 @pindex ml_fetch_all
422467
423468 Fetch and return all of the items in a list.
424469
425-@item MLError ml_send_command(MediaList* list, MLCommand command, string[] args)
470+@item void ml_send_command(MediaList* list, MLCommand command, string[] args)
471+@item void ml_send_command(MediaList* list, MLCommand command, string[] args, out MLError error) nothrow
426472 @pindex ml_send_command
427473
428474 Send a command to the list. This is how all of the editing of the list is done.
@@ -484,8 +530,8 @@ int main(string[] args)
484530 ml_send_command(list, MLCommand.add, ["Item 2", "10/100"], err);
485531 if (MLError.success != err) print_error(err);
486532
487- ml_send_command(list, MLCommand.add, ["Item 3", null, "PLAN-TO-WATCH"],
488- err);
533+ ml_send_command(list, MLCommand.add,
534+ ["Item 3", null, "PLAN-TO-WATCH"], err);
489535 if (MLError.success != err) print_error(err);
490536
491537 ml_send_command(list, MLCommand.add, ["Item 4", "10/10", "COMPLETE"],
@@ -504,12 +550,12 @@ int main(string[] args)
504550 if (MLError.success != err) print_error(err);
505551
506552 ml_send_command(list, MLCommand.update,
507- ["4", "start_date::2021-11-25", "end_date::2022-02-13"],
508- err);
553+ ["4","start_date::2021-11-25","end_date::2022-02-13"],
554+ err);
509555 if (MLError.success != err) print_error(err);
510556
511- ml_send_command(list, MLCommand.update, ["3", "title::The Third Item"],
512- err);
557+ ml_send_command(list, MLCommand.update,
558+ ["3", "title::The Third Item"], err);
513559 if (MLError.success != err) print_error(err);
514560
515561 /* Fetch an item and write the details out. */