summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/sync/interface.jetpack-sync-codec.php')
-rw-r--r--plugins/jetpack/sync/interface.jetpack-sync-codec.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/jetpack/sync/interface.jetpack-sync-codec.php b/plugins/jetpack/sync/interface.jetpack-sync-codec.php
new file mode 100644
index 00000000..1405d90c
--- /dev/null
+++ b/plugins/jetpack/sync/interface.jetpack-sync-codec.php
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * Very simple interface for encoding and decoding input
+ * This is used to provide compression and serialization to messages
+ **/
+interface iJetpack_Sync_Codec {
+ // we send this with the payload so we can select the appropriate decoder at the other end
+ public function name();
+
+ public function encode( $object );
+
+ public function decode( $input );
+}