aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Teirney <david@teirney.net>2011-09-04 17:52:09 +1200
committerDavid Teirney <david@teirney.net>2011-09-04 18:24:19 +1200
commit7ca8283546b3e98734510ddb9cf01e614e648e2a (patch)
tree0986201bdc24037da487fcb645855f7c9b4e9ba5 /lib
parentfef5c5a0780dfcc72e9e310a36960410b9447610 (diff)
Introduce a cmyth_proginfo_flags method to retrieve the flags associated with a recorded program.
Diffstat (limited to 'lib')
-rw-r--r--lib/cmyth/Win32/libcmyth.def1
-rw-r--r--lib/cmyth/include/cmyth/cmyth.h8
-rw-r--r--lib/cmyth/libcmyth/proginfo.c24
3 files changed, 33 insertions, 0 deletions
diff --git a/lib/cmyth/Win32/libcmyth.def b/lib/cmyth/Win32/libcmyth.def
index 2386330a24..7ea435670f 100644
--- a/lib/cmyth/Win32/libcmyth.def
+++ b/lib/cmyth/Win32/libcmyth.def
@@ -131,6 +131,7 @@ EXPORTS
cmyth_proginfo_rec_start
cmyth_proginfo_rec_end
cmyth_proginfo_rec_status
+ cmyth_proginfo_flags
cmyth_proginfo_get_detail
cmyth_proginfo_compare
cmyth_proginfo_host
diff --git a/lib/cmyth/include/cmyth/cmyth.h b/lib/cmyth/include/cmyth/cmyth.h
index ca24853ac2..d09aa64196 100644
--- a/lib/cmyth/include/cmyth/cmyth.h
+++ b/lib/cmyth/include/cmyth/cmyth.h
@@ -841,6 +841,14 @@ extern cmyth_proginfo_rec_status_t cmyth_proginfo_rec_status(
cmyth_proginfo_t prog);
/**
+ * Retrieve the flags associated with a program.
+ * \param prog proginfo handle
+ * \return flags
+ */
+extern unsigned long cmyth_proginfo_flags(
+ cmyth_proginfo_t prog);
+
+/**
* Retrieve the size, in bytes, of a program.
* \param prog proginfo handle
* \return program length
diff --git a/lib/cmyth/libcmyth/proginfo.c b/lib/cmyth/libcmyth/proginfo.c
index 0b957e52d4..a4b7b41a47 100644
--- a/lib/cmyth/libcmyth/proginfo.c
+++ b/lib/cmyth/libcmyth/proginfo.c
@@ -1201,6 +1201,30 @@ cmyth_proginfo_rec_status(cmyth_proginfo_t prog)
}
/*
+ * cmyth_proginfo_flags(cmyth_proginfo_t prog)
+ *
+ * Scope: PUBLIC
+ *
+ * Description
+ *
+ * Retrieves the flags mask from a program info structure.
+ *
+ * Return Value:
+ *
+ * Success: The program flag mask.
+ *
+ * Failure: 0 (an invalid status)
+ */
+unsigned long
+cmyth_proginfo_flags(cmyth_proginfo_t prog)
+{
+ if (!prog) {
+ return 0;
+ }
+ return prog->proginfo_program_flags;
+}
+
+/*
* cmyth_proginfo_prodyear(cmyth_proginfo_t prog)
*
*