X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fsession_file.c;h=dc4012d95ec6c3828c55f918dccc3e3d734d76c5;hp=9f5c5157f3f07d5410ec4326b01c06b6cbfec9ca;hb=a0418c20d8eebb4ed127b04256e1b7a1dc2bdc7e;hpb=f476dd2d2bcd482e76e9d174706e494a248156ff diff --git a/src/session_file.c b/src/session_file.c index 9f5c5157..dc4012d9 100644 --- a/src/session_file.c +++ b/src/session_file.c @@ -43,12 +43,14 @@ * @{ */ +/** @cond PRIVATE */ extern SR_PRIV struct sr_dev_driver session_driver; +/** @endcond */ static int session_driver_initialized = 0; #if !HAVE_ZIP_DISCARD -/* Replacement for zip_discard() if it isn't available. - */ +/* Replacement for zip_discard() if it isn't available. */ +/** @private */ SR_PRIV void sr_zip_discard(struct zip *archive) { if (zip_unchange_all(archive) < 0 || zip_close(archive) < 0) @@ -56,10 +58,15 @@ SR_PRIV void sr_zip_discard(struct zip *archive) } #endif -/** Read metadata entries from a session archive. +/** + * Read metadata entries from a session archive. + * * @param[in] archive An open ZIP archive. * @param[in] entry Stat buffer filled in for the metadata archive member. + * * @return A new key/value store containing the session metadata. + * + * @private */ SR_PRIV GKeyFile *sr_sessionfile_read_metadata(struct zip *archive, const struct zip_stat *entry) @@ -163,13 +170,14 @@ SR_PRIV int sr_sessionfile_check(const char *filename) return SR_OK; } +/** @private */ SR_PRIV struct sr_dev_inst *sr_session_prepare_sdi(const char *filename, struct sr_session **session) { struct sr_dev_inst *sdi = NULL; sdi = g_malloc0(sizeof(struct sr_dev_inst)); sdi->driver = &session_driver; - sdi->status = SR_ST_ACTIVE; + sdi->status = SR_ST_INACTIVE; if (!session_driver_initialized) { /* first device, init the driver */ session_driver_initialized = 1;