Index: branches/tap_branches/ippTools/src/pxregister.c
===================================================================
--- branches/tap_branches/ippTools/src/pxregister.c	(revision 25900)
+++ branches/tap_branches/ippTools/src/pxregister.c	(revision 27838)
@@ -58,2 +58,67 @@
     return true;
 }
+
+bool pxrawExpSetState(pxConfig *config, psS64 exp_id, const char *state)
+{
+    if (!exp_id) {
+        psError(PS_ERR_UNKNOWN, true, "0 is not a valid exp_id");
+        return false;
+    }
+    PS_ASSERT_PTR_NON_NULL(state, false);
+
+    // check that state is a valid string value
+    if (!(
+            (strncmp(state, "full", 5) == 0)
+            || (strncmp(state, "new", 4) == 0)
+	    || (strncmp(state, "goto_compressed", 14) == 0)
+	    || (strncmp(state, "compressed", 11) == 0)
+	    || (strncmp(state, "goto_lossy", 11) == 0)
+            || (strncmp(state, "lossy", 6) == 0)
+        )
+    ) {
+        psError(PS_ERR_UNKNOWN, false,
+                "invalid rawExp state: %s", state);
+        return false;
+    }
+
+    char *query = "UPDATE rawExp SET state = '%s' WHERE exp_id = %"PRId64;
+    if (!p_psDBRunQueryF(config->dbh, query, state, exp_id)) {
+        psError(PS_ERR_UNKNOWN, false,
+                "failed to change state for exp_id %"PRId64, exp_id);
+        return false;
+    }
+
+    return true;
+}
+bool pxrawImfileSetState(pxConfig *config, psS64 exp_id, const char *class_id, const char *state)
+{
+    if (!exp_id) {
+        psError(PS_ERR_UNKNOWN, true, "0 is not a valid exp_id");
+        return false;
+    }
+    PS_ASSERT_PTR_NON_NULL(state, false);
+
+    // check that state is a valid string value
+    if (!(
+            (strncmp(state, "full", 5) == 0)
+            || (strncmp(state, "new", 4) == 0)
+	    || (strncmp(state, "goto_compressed", 14) == 0)
+	    || (strncmp(state, "compressed", 11) == 0)
+	    || (strncmp(state, "goto_lossy", 11) == 0)
+            || (strncmp(state, "lossy", 6) == 0)
+        )
+    ) {
+        psError(PS_ERR_UNKNOWN, false,
+                "invalid rawImfile data_state: %s", state);
+        return false;
+    }
+
+    char *query = "UPDATE rawImfile SET data_state = '%s' WHERE class_id = %s AND exp_id = %"PRId64;
+    if (!p_psDBRunQueryF(config->dbh, query, state, class_id, exp_id)) {
+        psError(PS_ERR_UNKNOWN, false,
+                "failed to change state for exp_id %"PRId64, exp_id);
+        return false;
+    }
+
+    return true;
+}
