mstoredb backend: add stubs to allow server to survive a mapitest run.
authorbradh <bradh@71d39326-ef09-db11-b2a4-00e04c779ad1>
Sat, 22 Jan 2011 21:41:51 +0000 (21:41 +0000)
committerbradh <bradh@71d39326-ef09-db11-b2a4-00e04c779ad1>
Sat, 22 Jan 2011 21:41:51 +0000 (21:41 +0000)
git-svn-id: https://svn.openchange.org/openchange@2531 71d39326-ef09-db11-b2a4-00e04c779ad1

branches/mapistore_v2/mapiproxy/libmapistore/backends/mapistore_mstoredb.c

index c3b4cb13c1c072317afb6c4342f2de94fd910e88..e01a4db1c4c67629a44bd43c29a6b553038d2891 100644 (file)
@@ -1013,6 +1013,84 @@ static enum MAPISTORE_ERROR mstoredb_op_add_table_row(void *private_data, const
        return MAPISTORE_SUCCESS;
 }
 
+
+static enum MAPISTORE_ERROR mstoredb_op_create_message(void *private_data,
+                                                      uint64_t fid,
+                                                      uint64_t mid)
+{
+       DEBUG(0, ("[%s:%d][%s] not yet implemented\n", __FILE__, __LINE__, __FUNCTION__));
+
+       /* TODO: sanity checks */
+       
+       /* TODO: temporary object */
+       
+       return MAPISTORE_SUCCESS;
+}
+
+
+static enum MAPISTORE_ERROR mstoredb_op_release_record(void *private_data, uint64_t fmid, uint8_t type)
+{
+       DEBUG(0, ("[%s:%d][%s] not yet implemented\n", __FILE__, __LINE__, __FUNCTION__));
+
+       /* TODO: sanity checks */
+
+       /* TODO: temporary object */
+
+       return MAPISTORE_SUCCESS;
+}
+
+
+static enum MAPISTORE_ERROR mstoredb_op_savechangesmessage(void *private_data,
+                                                          uint64_t mid,
+                                                          uint8_t flags)
+{
+       DEBUG(0, ("[%s:%d][%s] not yet implemented\n", __FILE__, __LINE__, __FUNCTION__));
+
+       /* TODO: sanity checks */
+
+       /* TODO: construct LDIF */
+       
+       /* TODO: write to store */
+
+       return MAPISTORE_SUCCESS;
+}
+
+
+static enum MAPISTORE_ERROR mstoredb_op_deletemessage(void *private_data,
+                                                     uint64_t mid,
+                                                     uint8_t flags)
+{
+       DEBUG(0, ("[%s:%d][%s] not yet implemented\n", __FILE__, __LINE__, __FUNCTION__));
+
+       /* TODO: sanity checks */
+
+       /* TODO: construct LDIF */
+       
+       /* TODO: commit to store */
+
+       return MAPISTORE_SUCCESS;
+}
+
+
+static enum MAPISTORE_ERROR mstoredb_op_open_message(void *private_data,
+                                                    uint64_t fid,
+                                                    uint64_t mid,
+                                                    struct mapistore_message *msg)
+{
+       /* TODO: sanity checks */
+
+       /* TODO: construct query */
+
+       /* TODO: retrieve data */
+
+       /* TODO: construct real result */
+       msg->recipients = NULL;
+       msg->properties = NULL;
+
+       return MAPISTORE_ERR_NOT_FOUND;
+}
+
+
 /**
    \details Entry point for mapistore MSTOREDB backend
 
@@ -1034,7 +1112,7 @@ enum MAPISTORE_ERROR mapistore_init_backend(void)
        backend.delete_context = mstoredb_delete_context;
        backend.op_root_mkdir = mstoredb_op_root_mkdir;
        backend.create_uri = mstoredb_create_uri;
-       backend.release_record = NULL;
+       backend.release_record = mstoredb_op_release_record;
        backend.get_path = NULL;
        backend.op_mkdir = mstoredb_op_mkdir;
        backend.op_rmdir = mstoredb_op_rmdir;
@@ -1042,14 +1120,14 @@ enum MAPISTORE_ERROR mapistore_init_backend(void)
        backend.op_closedir = NULL;
        backend.op_readdir_count = mstoredb_op_readdir_count;
        backend.op_get_table_property = mstoredb_op_get_table_property;
-       backend.op_openmessage = NULL;
-       backend.op_createmessage = NULL;
-       backend.op_savechangesmessage = NULL;
+       backend.op_openmessage = mstoredb_op_open_message;
+       backend.op_createmessage = mstoredb_op_create_message;
+       backend.op_savechangesmessage = mstoredb_op_savechangesmessage;
        backend.op_submitmessage = NULL;
        backend.op_getprops = mstoredb_op_getprops;
        backend.op_get_fid_by_name = mstoredb_op_get_fid_by_name;
        backend.op_setprops = mstoredb_op_setprops;
-       backend.op_deletemessage = NULL;
+       backend.op_deletemessage = mstoredb_op_deletemessage;
        backend.op_get_table = mstoredb_op_get_table;
        backend.op_add_table_row = mstoredb_op_add_table_row;