jelmer/openchange.git
12 years agoMoving initial waf branch to waf_initial so we can compute new wscript scripts and... waf_initial
Julien Kerihuel [Wed, 21 Mar 2012 16:56:20 +0000 (16:56 +0000)]
Moving initial waf branch to waf_initial so we can compute new wscript scripts and previous work done

13 years agoWAF pending work on libmapi, libocpf and libmapistore. Not good enough to enter trunk.
Julien Kerihuel [Tue, 22 Feb 2011 10:52:02 +0000 (10:52 +0000)]
WAF pending work on libmapi, libocpf and libmapistore. Not good enough to enter trunk.

13 years agomapistore: parameterise out some variables in the provision test script
Brad Hards [Tue, 22 Feb 2011 00:07:33 +0000 (00:07 +0000)]
mapistore: parameterise out some variables in the provision test script

Also add a test for creating the Inbox context.

13 years agomapistore: implement get_folder_count() in mapistore python bindings
Brad Hards [Mon, 21 Feb 2011 02:19:57 +0000 (02:19 +0000)]
mapistore: implement get_folder_count() in mapistore python bindings

Also convert mapistore_strip_ns_from_uri to use const char**

Also add a test for mapistore rmdir(), which appears to have
some kind of reference count problem - it is causing a python
assert that indicates that something is still reachable.

13 years agopyopenchange: add test case for mapistore closedir()
Brad Hards [Sun, 20 Feb 2011 10:22:42 +0000 (10:22 +0000)]
pyopenchange: add test case for mapistore closedir()

13 years agofsocpf: Fix updating of properties
Brad Hards [Sat, 19 Feb 2011 11:16:12 +0000 (11:16 +0000)]
fsocpf: Fix updating of properties

We can now either set properties where none exist, update existing property
values, and add properties to those that are already set.

13 years agofsocpf: Minor work on set properties
Brad Hards [Fri, 18 Feb 2011 04:04:06 +0000 (04:04 +0000)]
fsocpf: Minor work on set properties

The problem is that we can't yet update .properties

13 years agomapistore: fix fsocpf backend opendir and set_props calls
Brad Hards [Thu, 17 Feb 2011 22:57:12 +0000 (22:57 +0000)]
mapistore: fix fsocpf backend opendir and set_props calls

The set_props call isn't right - it only works for the case where
the folder we are changing is the root of the context. I see
"Invalid OCPF context" error messages, although we do try to write
to the correct file.

13 years ago- Move libmapistore pc file into mapiproxy/libmapistore
Julien Kerihuel [Thu, 17 Feb 2011 17:51:39 +0000 (17:51 +0000)]
- Move libmapistore pc file into mapiproxy/libmapistore
- Complete make install process for waf libmapistore
- Add backends compilation and dependencies check to WAF libmapistore

13 years agomapistore: Add unit tests for opendir and setprops.
Brad Hards [Thu, 17 Feb 2011 05:06:52 +0000 (05:06 +0000)]
mapistore: Add unit tests for opendir and setprops.

This currently breaks the tests (i.e. they fail / segfault).

13 years agobuildsystem: cleanup mapistore coverage noise files on make clean / distclean
Brad Hards [Thu, 17 Feb 2011 05:05:56 +0000 (05:05 +0000)]
buildsystem: cleanup mapistore coverage noise files on make clean / distclean

13 years agomapistore: add unit tests of creating a sub-folder.
Brad Hards [Thu, 17 Feb 2011 03:59:00 +0000 (03:59 +0000)]
mapistore: add unit tests of creating a sub-folder.

13 years agoAdd unit tests for python mapistore / mapistoredb
Brad Hards [Thu, 17 Feb 2011 03:41:30 +0000 (03:41 +0000)]
Add unit tests for python mapistore / mapistoredb

Run it like:
./pyopenchange/unittest/unittest_mapistoredb.py
(or add -v for more verbose output)

13 years agomapistore: Turn down URI generation message to DEBUG level
Brad Hards [Thu, 17 Feb 2011 01:54:56 +0000 (01:54 +0000)]
mapistore: Turn down URI generation message to DEBUG level

13 years agoInstall header files for libmapistore
Julien Kerihuel [Wed, 16 Feb 2011 23:27:54 +0000 (23:27 +0000)]
Install header files for libmapistore

13 years ago- Introduce preliminary WAF build system support for libmapistore
Julien Kerihuel [Wed, 16 Feb 2011 23:04:06 +0000 (23:04 +0000)]
- Introduce preliminary WAF build system support for libmapistore
- Remove libmapi/libmapi.h references within libmapistore

- Add a WAF_BUILD_INC macros to config.mk.in so waf and autoconf
  requirements with regards to includes gets similar

- Change libmapistore includes

13 years agomapistore: Move some function declarations from mapistore_common.h to mapistore_backend.h
Brad Hards [Wed, 16 Feb 2011 05:14:13 +0000 (05:14 +0000)]
mapistore: Move some function declarations from mapistore_common.h to mapistore_backend.h

Most of these require a backend context. mapistore_strip_ns_from_uri() doesn't
require one, but its currently only used from the backends, and that seems
the mostly use.

Also fix / move a bit of API documentation.

13 years agomapistore: Use __FUNCTION__ macro instead of the literal function name for talloc_named()
Brad Hards [Wed, 16 Feb 2011 04:30:31 +0000 (04:30 +0000)]
mapistore: Use __FUNCTION__ macro instead of the literal function name for talloc_named()

Just makes it easier to update / harder to forget to change the name.

13 years agoRemove stray semicolons.
Brad Hards [Wed, 16 Feb 2011 03:59:33 +0000 (03:59 +0000)]
Remove stray semicolons.

13 years agopyopenchange: add setters for database path and named properties database path.
Brad Hards [Wed, 16 Feb 2011 03:58:55 +0000 (03:58 +0000)]
pyopenchange: add setters for database path and named properties database path.

13 years agopyopenchange: Minor cleanup in mapistoredb test
Brad Hards [Wed, 16 Feb 2011 03:55:28 +0000 (03:55 +0000)]
pyopenchange: Minor cleanup in mapistoredb test

Remove stray semicolon, and fix typo.

13 years agomapistore: debug typo fix.
Brad Hards [Wed, 16 Feb 2011 03:53:40 +0000 (03:53 +0000)]
mapistore: debug typo fix.

13 years agomapistore: Remove commented-out declaration.
Brad Hards [Wed, 16 Feb 2011 02:47:38 +0000 (02:47 +0000)]
mapistore: Remove commented-out declaration.

13 years agomapistore: Clean up api documentation noise
Brad Hards [Wed, 16 Feb 2011 01:35:45 +0000 (01:35 +0000)]
mapistore: Clean up api documentation noise

13 years agomapistore: Fix API documentation formatting for enum MAPISTORE_NAMEDPROPS_PROVISION_TYPE
Brad Hards [Wed, 16 Feb 2011 00:43:42 +0000 (00:43 +0000)]
mapistore: Fix API documentation formatting for enum MAPISTORE_NAMEDPROPS_PROVISION_TYPE

13 years agoTry harder to not show _PUBLIC_ export defines in the API documentation
Brad Hards [Wed, 16 Feb 2011 00:42:52 +0000 (00:42 +0000)]
Try harder to not show _PUBLIC_ export defines in the API documentation

13 years agomapistore: fix API documentation for mapistore_createmessage()
Brad Hards [Wed, 16 Feb 2011 00:14:01 +0000 (00:14 +0000)]
mapistore: fix API documentation for mapistore_createmessage()

13 years agomapistore: minor cleanups for mapistore_mkdir()
Brad Hards [Wed, 16 Feb 2011 00:07:26 +0000 (00:07 +0000)]
mapistore: minor cleanups for mapistore_mkdir()

 - initialize pointers to NULL
 - API documentation updates
 - comment fixes
 - relabel one label to make it clearer

13 years agoDefinitely change API and move from mapistore v1 to mapistore
Julien Kerihuel [Tue, 15 Feb 2011 15:32:03 +0000 (15:32 +0000)]
Definitely change API and move from mapistore v1 to mapistore
v2. Server is currently broken and many fsocpf features are not
working. They will be fixed along future commits.

In a nutshell, this commit change mapistore so backend only have to
deal with URI. They don't have any knowledge about FID or MID.

It also implements mkdir for mstoredb and fsocpf.

In details:
- Update provision test script to:
  - create Conflicts folder within Sync Issues folder (not root
  folder)
  - change MDB_INBOX from mstoredb to fsocpf after mstoredb Inbox
    creation

- Update python bindings.
  - Add working implementation for:
    - add_context
    - get_folder_identifier
    - opendir
    - mkdir
  - Add mapistore python bindings getsetters for debuglevel. This offers
  an easy way to increase verbosity when debugging or analyzing
  failures.
  - Add objects for folder type enum (generic, search)

- Fix fsocpf model to use URI instead of FID/MID
- Fix create_context, opendir, mkdir implementation for fsocpf

- Commit all mapistore code within EMSMDB server.

- Add mapistore_set_debuglevel to set the mapistore debug level
- Add convenient public/common function to remove the namespace from a
  URI
- Add a function to return the URI for a default folder within a given
  context
- Add a function to return the folder identifier associated to a
  mapistore URI relative to a context identifier

- Add a mapistore indexing function to return the URI associated to a
  mapistore FMID for a given folder or message.

13 years agoRemove temporary hack introduced in r2228
Brad Hards [Mon, 14 Feb 2011 23:00:41 +0000 (23:00 +0000)]
Remove temporary hack introduced in r2228

The linking problem with samba4 is now fixed

This resolves task #330.

13 years agoserver: intialize aux_header buffer to null if the data is missing.
Brad Hards [Sun, 13 Feb 2011 23:33:36 +0000 (23:33 +0000)]
server: intialize aux_header buffer to null if the data is missing.

This is a merge of r2581 from the plugfest branch.

13 years agoserver: fix handling of XorMagic flag
Brad Hards [Sun, 13 Feb 2011 23:13:35 +0000 (23:13 +0000)]
server: fix handling of XorMagic flag

This is a merge of r2571 from the plugfest branch, and addresses some of
the problems seen with the Microsoft MS-OXCRPC test.

13 years agoserver: Correct handling of rgwBestVersion
Brad Hards [Sun, 13 Feb 2011 22:25:52 +0000 (22:25 +0000)]
server: Correct handling of rgwBestVersion

The logic is to return either the client version (if its ok) or the minimum
version that is required to connect (if the client version is not ok).

This is a merge of r2576 from the plugfest branch.

13 years agoserver: fix samdb_connect() signature.
Brad Hards [Sun, 13 Feb 2011 22:15:27 +0000 (22:15 +0000)]
server: fix samdb_connect() signature.

This is a merge of r2578 from the plugfest branch. Providing
signatures of samba functions was a hack, which we'll fix in due course.

13 years agoserver: Fix IDL for parsing of AUX_PERF_PROCESSINFO buffer.
Brad Hards [Sun, 13 Feb 2011 21:57:46 +0000 (21:57 +0000)]
server: Fix IDL for parsing of AUX_PERF_PROCESSINFO buffer.

This is a merge of r2589 from plugfest branch

13 years agolibmapi: change mapidump_recipients to use PropertyTagArray_r
Brad Hards [Sun, 13 Feb 2011 09:31:45 +0000 (09:31 +0000)]
libmapi: change mapidump_recipients to use PropertyTagArray_r

This matches the ResolveNames() argument, and fixes 3 warnings.

13 years agolibexchange2ical: handle change in function signature introduced in libical 0.46
Brad Hards [Sun, 13 Feb 2011 08:50:04 +0000 (08:50 +0000)]
libexchange2ical: handle change in function signature introduced in libical 0.46

13 years agoAdd PtypString8 entries for each string to enum mapitags.
Brad Hards [Sun, 13 Feb 2011 06:49:37 +0000 (06:49 +0000)]
Add PtypString8 entries for each string to enum mapitags.

This prevents some warnings, and is useful for completeness.

13 years agocheck_fasttransfer: Fix warnings from recent mapistore changes.
Brad Hards [Sun, 13 Feb 2011 04:05:11 +0000 (04:05 +0000)]
check_fasttransfer: Fix warnings from recent mapistore changes.

13 years agoComment fix.
Brad Hards [Fri, 11 Feb 2011 03:52:22 +0000 (03:52 +0000)]
Comment fix.

13 years agoserver: Update to reflect samba4 auth changes
Brad Hards [Fri, 11 Feb 2011 01:12:31 +0000 (01:12 +0000)]
server: Update to reflect samba4 auth changes

Patch by Andrew Tridgell. Thanks!

13 years agoMinor addition documentation changes for samba build system changes.
Brad Hards [Thu, 10 Feb 2011 04:49:11 +0000 (04:49 +0000)]
Minor addition documentation changes for samba build system changes.

We can now do the whole provisioning stage from the top level
openchange directory.

13 years agoMinor additional samba4 build script fixes.
Brad Hards [Wed, 9 Feb 2011 05:00:47 +0000 (05:00 +0000)]
Minor additional samba4 build script fixes.

13 years agoFix typo in Makefile (DESTIDR -> DESTDIR).
Jelmer Vernooij [Tue, 8 Feb 2011 11:16:28 +0000 (11:16 +0000)]
Fix typo in Makefile (DESTIDR -> DESTDIR).

13 years ago- Add an initialization function for backends. This function offers
Julien Kerihuel [Tue, 8 Feb 2011 11:03:07 +0000 (11:03 +0000)]
- Add an initialization function for backends. This function offers
  backends the ability to remove empty skeleton from their code and
  ensure they won't crash the server if one ops is missing.

- Make defaults ops return MAPISTORE_ERR_NOT_IMPLEMENTED

- Call mapistore_backend_init_defaults from backends

- Turn DEBUG macros into MSTORE_DEBUG_* in backends

13 years agoTurn DEBUG() macros into MSTORE_DEBUG_*()
Julien Kerihuel [Tue, 8 Feb 2011 00:00:46 +0000 (00:00 +0000)]
Turn DEBUG() macros into MSTORE_DEBUG_*()

13 years ago- Let backends register named properties:
Julien Kerihuel [Mon, 7 Feb 2011 16:10:32 +0000 (16:10 +0000)]
- Let backends register named properties:
  - Either external == public, used by a client and understood by the
    associated backend only
  - Or internal == private, only for backend's internal usage

Backends can either specify a buffer with LDIF data or full patch to
the LDIF file.

mapping index attribute is automatically updated both for CN=External
and CN=Internal. Backends are guaranteed (upon successful
registration) that each of the backend property is mapped and available.

- Add MAPISTORE_ERR_NOT_IMPLEMENTED error code to mapistore errors enum

- Add skeleton backend's hook for namedprops provisioning in mstoredb
  and fsocpf backends.

13 years agoStart internal index mapping at 0x1 instead of 0x0
Julien Kerihuel [Mon, 7 Feb 2011 15:38:43 +0000 (15:38 +0000)]
Start internal index mapping at 0x1 instead of 0x0

13 years agoAdd an objectClass: External and objectClass: Internal for better
Julien Kerihuel [Mon, 7 Feb 2011 11:45:43 +0000 (11:45 +0000)]
Add an objectClass: External and objectClass: Internal for better
indexing and search

13 years agoMinor documentation update to reflect samba4 buildsystem changes.
Brad Hards [Mon, 7 Feb 2011 11:01:10 +0000 (11:01 +0000)]
Minor documentation update to reflect samba4 buildsystem changes.

13 years agoUpdate build script to reflect samba buildsystem changes.
Brad Hards [Mon, 7 Feb 2011 10:50:45 +0000 (10:50 +0000)]
Update build script to reflect samba buildsystem changes.

More changes are required for documentation.

13 years agoMinor update for API documentation
Brad Hards [Sun, 6 Feb 2011 22:51:29 +0000 (22:51 +0000)]
Minor update for API documentation

13 years ago- Add a function to provision a namespace in named properties database
Julien Kerihuel [Fri, 4 Feb 2011 14:07:37 +0000 (14:07 +0000)]
- Add a function to provision a namespace in named properties database
  for a given user and associated python bindings code

- Add a function to check if a user exists in named properties
  database

- Add python bindings code to turn MAPISTORE_ERROR into string error
  messages both within mapistore and mapistoredb interfaces

- Update provision script to display error strings instead of integer
  values and update provision.py test code to create a named
  properties namespace for the user.

13 years ago- Generate pymapi properties objects from makepropslist.py rather than
Julien Kerihuel [Fri, 4 Feb 2011 12:45:55 +0000 (12:45 +0000)]
- Generate pymapi properties objects from makepropslist.py rather than
  mparse.pl

- Commit pymapi_properties.c instead of auto-generating during make
  process

- Remove pymapi_properties code generation from mparse.pl and avoid it
  from being removed upon make clean.

- Adjust the very basic properties.py sample to use canonical names
  instead of altnames and remove unsupported (not covered by MS Doc)
  properties from the example.

13 years ago- Add mapistore function and associate bindings to retrieve the
Julien Kerihuel [Thu, 3 Feb 2011 17:48:11 +0000 (17:48 +0000)]
- Add mapistore function and associate bindings to retrieve the
  default first available ID both for external and internal mappings.

- Remove unused variable in mapistore_namedprops.c

13 years agoFix incorrect cn for CN=External,CN=Server record
Julien Kerihuel [Thu, 3 Feb 2011 17:06:42 +0000 (17:06 +0000)]
Fix incorrect cn for CN=External,CN=Server record

13 years agoRemove remaining references to nprops_ctx and replace them with
Julien Kerihuel [Thu, 3 Feb 2011 16:59:32 +0000 (16:59 +0000)]
Remove remaining references to nprops_ctx and replace them with
mapistore_nprops_ctx.

13 years ago- Move named properties database provisioning out of mapistore_init()
Julien Kerihuel [Thu, 3 Feb 2011 16:36:44 +0000 (16:36 +0000)]
- Move named properties database provisioning out of mapistore_init()

- Only create it through mapistoredb at provisioning time

- Add an interface in libmapistore/database to provision named
  properties and add associated python bindings and working code
  example within pyopenchange/tests/provision.py

- Remove deprecated code from mparse.pl for known and named property tags

- Add a convenient function in mapistore_processing.c to provision a
  LDB database using a LDIF file

- Add database schema and ROOTDSE to mapi_named_properties.ldb
  database

- Add MAPISTORE_ERR_NOT_IMPLEMENTED error code to the MAPISTORE_ERROR
  enum

- Replace some existing DEBUG macros with MSTORE_DEBUG_ equivalent

13 years agoFor named properties duplicate checks on MNID_STRING we want to couple
Julien Kerihuel [Thu, 3 Feb 2011 16:14:23 +0000 (16:14 +0000)]
For named properties duplicate checks on MNID_STRING we want to couple
the keyword to the oleguid, if oleguid mismatches, then it must not be
considered as a duplicate.

Update generated code concerned by this change

13 years ago- Fix LDIF file generation for named properties database (dn: was
Julien Kerihuel [Thu, 3 Feb 2011 15:45:41 +0000 (15:45 +0000)]
- Fix LDIF file generation for named properties database (dn: was
  missing)

- Remove named properties duplicate (MNID_ID or MNID_STRING). This was
  also preventing from provisioning the named properties database
  properly.

- Update files concerned by the parser changes

13 years agoRelease mem_ctx where needed
Julien Kerihuel [Thu, 3 Feb 2011 13:55:50 +0000 (13:55 +0000)]
Release mem_ctx where needed

13 years ago- Add getsetters on mapistore_named_properties.ldb database
Julien Kerihuel [Thu, 3 Feb 2011 12:41:54 +0000 (12:41 +0000)]
- Add getsetters on mapistore_named_properties.ldb database

- Add a pointer to mapistore_named_properties database in
  mapistoredb_conf structure and initialize it within
  mapistoredb_init() function.

13 years ago- Update makepropslist.py to generate named properties header files
Julien Kerihuel [Thu, 3 Feb 2011 12:03:59 +0000 (12:03 +0000)]
- Update makepropslist.py to generate named properties header files
  and mapistore_v2 named props database LDIF file.

- Do not generate mapi_nameid.h and mapi_nameid_private.h using
  mparse.pl but makepropslist.py

- Add these files to the repository. We shouldn't have to update them
  until next Microsoft Documentation release.

- Add additional documentation fix to makepropslist.h

- Add a static mapistore_namedprops_v2.ldif which will replace
  mapistore_namedprops.ldif once we switch from v1 to v2.

13 years agoFix Property tag attribute fetching for named properties. The split on
Julien Kerihuel [Tue, 1 Feb 2011 15:14:25 +0000 (15:14 +0000)]
Fix Property tag attribute fetching for named properties. The split on
':' was applied to the entire string. However some entries were using
urn: or DAV: or even http:.

This fix splits but with a maxCount of 1, preserving the remaining
string upon success.

13 years agoAdd missing file
Julien Kerihuel [Tue, 1 Feb 2011 10:29:32 +0000 (10:29 +0000)]
Add missing file

13 years agoMerge makepropslist script from Brad from mapistore_v2 back into
Julien Kerihuel [Tue, 1 Feb 2011 10:28:22 +0000 (10:28 +0000)]
Merge makepropslist script from Brad from mapistore_v2 back into
trunk.

This script takes Microsoft [MS-OXPROPS].pdf and turn it into C header
and source code file + an v1_enum used by exchange.idl. It is a
replacement to the existing mapitags.{c,h} and the static mparse.pl
script for MAPITAGS.

Generated files have also been added to the repository. We do not need
to update them unless next Microsoft documentation release (3 up to 6
months release cycle).

Update openchange code to use canonical names whereas needed.

13 years ago- Add getsetters for mapistore_uri to mapistore python interface
Julien Kerihuel [Mon, 31 Jan 2011 17:09:20 +0000 (17:09 +0000)]
- Add getsetters for mapistore_uri to mapistore python interface

- Implement the function required to update a mapistore uri

- Add a function to add an entry_r record to the indexing database

- Add a function to delete an entry_r record from the indexing
  database

- Update provision.py script to reflect this change

- Factorize code to add an entry_r record

13 years agoRetrieve value within uint32_t before casting it to MAPISTORE_DFLT_FOLDERS enum
Julien Kerihuel [Mon, 31 Jan 2011 16:30:24 +0000 (16:30 +0000)]
Retrieve value within uint32_t before casting it to MAPISTORE_DFLT_FOLDERS enum

13 years agoForce dflt_folders to be int in ParseTuple parsing
Julien Kerihuel [Mon, 31 Jan 2011 16:26:49 +0000 (16:26 +0000)]
Force dflt_folders to be int in ParseTuple parsing

13 years agoRemove warning.
Julien Kerihuel [Mon, 31 Jan 2011 16:22:20 +0000 (16:22 +0000)]
Remove warning.

13 years ago- Fix context_id sign in python bindings ParseTuple
Julien Kerihuel [Mon, 31 Jan 2011 16:14:46 +0000 (16:14 +0000)]
- Fix context_id sign in python bindings ParseTuple
- Use METH_KEYWORDS for some functions
- Add missing Py_INCREF in modules
- Moving mailbox provisioning into a start() function

13 years agoset params to NULL after calls to talloc_free
Julien Kerihuel [Mon, 31 Jan 2011 16:08:44 +0000 (16:08 +0000)]
set params to NULL after calls to talloc_free

13 years agoFix a typo in serverdn format string when setting up mapistore with a DC
Julien Kerihuel [Mon, 31 Jan 2011 11:32:24 +0000 (11:32 +0000)]
Fix a typo in serverdn format string when setting up mapistore with a DC

13 years agoALlow mstoredb to specify a different container class than IPF.Note
Julien Kerihuel [Fri, 28 Jan 2011 01:28:42 +0000 (01:28 +0000)]
ALlow mstoredb to specify a different container class than IPF.Note
depending on the root folder we are creating.

13 years ago- Implement the root_mkdir (db_mkdir) mapistore implementation which lets
Julien Kerihuel [Fri, 28 Jan 2011 01:15:03 +0000 (01:15 +0000)]
- Implement the root_mkdir (db_mkdir) mapistore implementation which lets
  create default system/special folders in mstoredb (mapistore.ldb), get
  new FIDs for these folders and register them in the indexing database.

- Update provision.py test provisioning script to reflect latest changes

- Add MDB default folders to pymapistore

- Add a new MAPISTORE error (MAPISTORE_ERR_INVALID_URI)

- Add username to backend_context structure

- Turn some DEBUG into MSTORE_DEBUG macros in mstoredb backend

- Add CN (default folder name) to the list of known folders for mstoredb backend.
  This provides a list of default names (English) for PidTagDisplayName property
  if not specified at provisioning time.

mapistore_mstoredb.c:289: warning: assignment from incompatible pointer type
This warning will be fixed in further commits when we come to propagate
mapistore_v2 mkdir implementation to fsocpf.

13 years agoImprove DEBUG macros to handle va_args instead of a static format string
Julien Kerihuel [Thu, 27 Jan 2011 18:04:29 +0000 (18:04 +0000)]
Improve DEBUG macros to handle va_args instead of a static format string

13 years agoIntroduce debugging macros and levels for backend willing to use a consistent debuggi...
Julien Kerihuel [Wed, 26 Jan 2011 22:16:51 +0000 (22:16 +0000)]
Introduce debugging macros and levels for backend willing to use a consistent debugging mechanism

13 years ago- Add login_user and username to mapistore context creation.
Julien Kerihuel [Wed, 26 Jan 2011 03:30:02 +0000 (03:30 +0000)]
- Add login_user and username to mapistore context creation.
These parameters are needed to query the correct indexing database (user based).
In the future login_user != username will be used for ACLs check etc.

- Add a provision.py script which will be used to test mapistore_v2 provisioning.

- We can now retrieve a context on the root mailbox folder from a mapistore.ldb
provisioning with mapistoredb and accessed through mapistore API.

Normally everything *SHOULD* still be working properly.
However *should* is not *must* and still I must commit.
I should shut up ...

13 years agoEnsure we reset mapping_path to NULL after free
Julien Kerihuel [Wed, 26 Jan 2011 03:18:15 +0000 (03:18 +0000)]
Ensure we reset mapping_path to NULL after free

13 years agoAdd a release function so we can safely free mapistore database references without...
Julien Kerihuel [Wed, 26 Jan 2011 03:17:29 +0000 (03:17 +0000)]
Add a release function so we can safely free mapistore database references without relying
on unpredictable timing from python garbage collector

13 years ago- Forgot the most obvious ... a reference to FMID within mapistore_indexing_entry...
Julien Kerihuel [Wed, 26 Jan 2011 01:06:43 +0000 (01:06 +0000)]
- Forgot the most obvious ... a reference to FMID within mapistore_indexing_entry IDL structure.
- Also add an IDL for reverse entries URI/... -> FMID/...
- Fix the reverse entries checking with NDR code rather than fuzzy str ops
- Add a dumping function for mapistore_indexing_entry_r

13 years agoFix uninitialized parent value in CreateMessage function.
Julien Kerihuel [Wed, 26 Jan 2011 00:37:49 +0000 (00:37 +0000)]
Fix uninitialized parent value in CreateMessage function.

13 years agoProviding setters for netbiosname, firstorg and firstou is messy.
Julien Kerihuel [Tue, 25 Jan 2011 22:48:39 +0000 (22:48 +0000)]
Providing setters for netbiosname, firstorg and firstou is messy.

If done after provisioning stage, introduce inconsistent entries within
mapistore.ldb database.

This commit replaces getters with parameters to the provision()
function in python bindings code.

Change python test code to reflect this change

13 years agoHandle FID/MID uniqueness BY MAILBOX rather than BY SERVER
Julien Kerihuel [Tue, 25 Jan 2011 22:30:36 +0000 (22:30 +0000)]
Handle FID/MID uniqueness BY MAILBOX rather than BY SERVER

The FID/MID namespace is unique per mailbox which means that even if
you get out of IDs, you only crash your mailbox, not the entire
server

The following commit introduces a user store object within mapistore.ldb located
under CN=${username},${firstorgdn} responsible from maintaining the GLobalCount
for the user mailbox.

Furthermore, this alters the core behavior of provisioning and introduce username
as being a parameter to most of the mapistore API (propagation scheduled among
mapistore_v1 to mapistore_v2 transition).

13 years ago- Do not assign mstore_ctx until we've had a chance to check if mapistore_backend_con...
Julien Kerihuel [Tue, 25 Jan 2011 07:12:18 +0000 (07:12 +0000)]
- Do not assign mstore_ctx until we've had a chance to check if mapistore_backend_context exist
- Implement mapistore_register_folder function which lets backend register a folder using its mapistore URI.
- Add a mapistore_indexing function that retrieves the FMID associated to a mapistore URI

This is Rock n' Roll code - untested but looks promising ;p

13 years agolibmapistore: Minor API documentation fixes.
Brad Hards [Tue, 25 Jan 2011 07:11:31 +0000 (07:11 +0000)]
libmapistore: Minor API documentation fixes.

13 years agoAfter a full and long programming day, it happends to be tired.
Julien Kerihuel [Tue, 25 Jan 2011 06:00:04 +0000 (06:00 +0000)]
After a full and long programming day, it happends to be tired.
This is a typical example of a programmer that needs a beer...

Fix the opaque to mapistore_context assignation

13 years agoLet a backend queries mapistore whether a given URI exists in the indexing database...
Julien Kerihuel [Tue, 25 Jan 2011 05:48:33 +0000 (05:48 +0000)]
Let a backend queries mapistore whether a given URI exists in the indexing database or not.

13 years ago- Add mapistore_indexing implementation got get/update operations
Julien Kerihuel [Tue, 25 Jan 2011 03:27:42 +0000 (03:27 +0000)]
- Add mapistore_indexing implementation got get/update operations

- Add a function to let mapistoredb register a message ID allocation
range for mailbox root container

- Update mapistoredb python test accordingly.

- Add preliminary (internal) dump routines for mapistore_indexing_entry objects.

13 years agoRevert local hack which shouldn't have ended on svn
Julien Kerihuel [Tue, 25 Jan 2011 03:25:26 +0000 (03:25 +0000)]
Revert local hack which shouldn't have ended on svn

13 years agoMerge change from plugfest branch:
Julien Kerihuel [Tue, 25 Jan 2011 01:34:39 +0000 (01:34 +0000)]
Merge change from plugfest branch:

Cleanup policy handle upon disconnect

13 years agoTurn enum MAPISTATUS_ERROR sanity checks with if statement into MAPISTORE_RETVAL_IF
Julien Kerihuel [Mon, 24 Jan 2011 23:13:16 +0000 (23:13 +0000)]
Turn enum MAPISTATUS_ERROR sanity checks with if statement into MAPISTORE_RETVAL_IF
wherever possible

13 years agoMove errors macro from mapistore_private.h to mapistore_errors.h
Julien Kerihuel [Mon, 24 Jan 2011 23:12:19 +0000 (23:12 +0000)]
Move errors macro from mapistore_private.h to mapistore_errors.h
Make macros available for backends

13 years agoFactorize title creation within a convenient function.
Julien Kerihuel [Mon, 24 Jan 2011 22:23:09 +0000 (22:23 +0000)]
Factorize title creation within a convenient function.
Make Jelmer smile ;-)

13 years ago- Commit preliminary bits of mapistore_v2 indexing database implementation.
Julien Kerihuel [Mon, 24 Jan 2011 22:14:00 +0000 (22:14 +0000)]
- Commit preliminary bits of mapistore_v2 indexing database implementation.
- Add comments to distinguish between mapistore_v1 and mapistore_v2 bits.
  For the moment both implementation coexist to keep the transition stage
  when switching from v1 to v2 as short as possible

- Fix compilation dependencies rules

- Solve the chicken/egg problem and create the Mailbox Root container for mstoredb
  in mapistore.ldb through mapistoredb interface

- Add context creation/deletion in mapistore_v2 indexing API
- Add function to add new fmid in mapistore_v2 indexing API

- Update mapistoredb bindings and test code to test new mailbox creation

13 years agoUpdate the svn ignore list for the indexing folder
Julien Kerihuel [Mon, 24 Jan 2011 17:27:12 +0000 (17:27 +0000)]
Update the svn ignore list for the indexing folder

13 years agoAdd the mapistore_v2 indexing IDL that will be used in conjunction to the new indexin...
Julien Kerihuel [Mon, 24 Jan 2011 17:08:18 +0000 (17:08 +0000)]
Add the mapistore_v2 indexing IDL that will be used in conjunction to the new indexing API:
This IDL is designed to pull/push the TDB value part of the key/value pair and hold information such as:
- type of item (folder/message/soft deleted)
- mapistore URI
- Parent folder ID
- allocation range for messages
- basic ACLs for folders

It furthermore introduces a versioning system which will help keeping consistencies
across further and potential updates.

13 years agoMove more functionality out of mapistore.h into a new shared header.
Brad Hards [Mon, 24 Jan 2011 06:32:55 +0000 (06:32 +0000)]
Move more functionality out of mapistore.h into a new shared header.

This avoids importing mapistore.h into the backends.

13 years agolibmapistore: Switch to using an enum to indicate the type of deletion operation...
Brad Hards [Mon, 24 Jan 2011 05:00:20 +0000 (05:00 +0000)]
libmapistore: Switch to using an enum to indicate the type of deletion operation (instead of #defines)

13 years agolibmapistore: minor API documentation update
Brad Hards [Mon, 24 Jan 2011 04:58:01 +0000 (04:58 +0000)]
libmapistore: minor API documentation update